#include<bits/stdc++.h>
using namespace std;

int T,mp[1000],a[1000],now[1000],nxt[1000],n,m,k,op,p[1000];

signed main()
{
	freopen("meow.in","r",stdin);
	freopen("meow.out","w",stdout);
	cin>>T;
	while(T--)
	{
		op=1;
		cin>>n>>m>>k;
		for(int i=1;i<=m;i++)
			cin>>a[i];
		for(int i=m;i>=1;i--)
		{
			if(mp[a[i]]==0)
			{
				mp[a[i]]==1;
				now[a[i]]=i;
			}
			else
			{
				nxt[i]=now[a[i]];
				now[a[i]]=i;
			}
		}
		cout<<"1 1"<<endl<<"1 1"<<endl<<"2 1 2"<<endl;
	}
}
