#include<bits/stdc++.h>
using namespace std;
int T,n,m,k,a[2000000],to[605];
int main(){
	freopen("meow.in","r",stdin);
	freopen("meow.out","w",stdout);
	cin>>T;
	while(T>0){
		memset(to,0,sizeof(to));
		cin>>n>>m>>k;
		int t=1;
		for(int i=1;i<=m;i++)cin>>a[i];
		for(int i=1;i<=m;i++){
			if(a[i]==a[i+1]){
				cout<<"1 1\n1 1\n";
				i++;continue;
			}
		}
		T--;
	}
}
