#include<bits/stdc++.h>
using namespace std;
int T;
int cnt[2000005];
int main()
{
	freopen("meow.in","r",stdin);
	freopen("meow.out","w",stdout);
	scanf("%d",&T);
	while(T--)
	{
		int n,m,k;
		scanf("%d%d%d",&n,&m,&k);
		for(int i=0;i<m;i++)
		{
			int x;
			scanf("%d",&x);
			cnt[x]++;
		}
		printf("%d\n",m+1);
		srand(time(NULL));
		for(int i=0;i<=m;i++)
		{
			int op=rand()%2+1,ans=rand();
			if(op==1) cout<<op<<' '<<rand()%n+1<<endl;
			else cout<<op<<' '<<rand()%n+1<<' '<<rand()%n+1<<endl;
		}
	}
	/*I can't do it!I love CCF!!*/
	/*last 30 mins...*/
	/*It's so difficult...*/
	
	return 0;
}
