#include<bits/stdc++.h>
using namespace std;
const int N=1000;
int T;
int z,w,y;
int a[N];
vector<int>q;
inline int read()
{
	int x=0,f=1;
	char ch=getchar();
	while(!isdigit(ch))
	{
		f=ch!='-';
		ch=getchar();
	}
	while(isdigit(ch))
	{
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return f?x:-x;
}

int main()
{
	freopen("meow.in","r",stdin);
	freopen("meow.out","w",stdout);
	T=read();
	while(T--)
	{
		z=read();
		w=read();
		y=read();
		for(int i=1;i<=w;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;
    }
}