#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 5;
int a[N];
int t;
int main(){
	freopen("meow.in","r",stdin);
	freopen("meow.out","w",stdout);
	cin>>t;
	while (t--){
		int n,m,k;
		cin>>n>>m>>k;
		for (int i=0;i<m;++i) cin>>a[i];
		cout<<5<<endl;
		cout<<1<<" "<<1<<endl;
		cout<<1<<" "<<1<<endl;
		cout<<1<<" "<<2<<endl;
		cout<<2<<" "<<1<<" "<<2<<endl;
		cout<<1<<" "<<1<<endl;
	}
	return 0;
}