//I love Zhang Shuhao
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<queue>
using namespace std;

struct step{
	int op,s1,s2;
};
int n,m,k,a[2000100];
vector <int > v1,v2;
vector <step > v;
int h1,h2;

void check(){
	if (v1.size()-h1>1 && v1[v1.size()-1]==v1[v1.size()-2]){
		v1.pop_back();
		v1.pop_back();
	}
	if (v2.size()-h2>1 && v2[v2.size()-1]==v1[v2.size()-2]){
		v2.pop_back();
		v2.pop_back();
	}
}

void push(int x,int y,int z){
	step t;
	t.op=x;
	t.s1=y;
	t.s2=z;
	v.push_back(t);
}

void work_1002(){
	v1.clear();
	v2.clear();
	v.clear();
	step t;
//	int len=2;
	h1=-1;h2=-1;
	t.op=1;t.s1=1;
	v.push_back(t);v.push_back(t);
	v1.push_back(a[1]);v1.push_back(a[2]);
	check();
	for (int i=3;i<=m;++i){
		if (v1.size()-h1==0){
			push(1,1,0);
			v1.push_back(a[i]);
		}
		else if (a[i]==v1[v1.size()-1]){
			push(1,1,0);
			v1.pop_back();
		}
		else if (a[i]==v2[v2.size()-1]){
			push(1,2,0);
			v2.pop_back();
		}
		
	}
	
	printf("%d\n",v.size());
	for (int i=0;i<v.size();++i){
		if (v[i].op==1){
			printf("1 %d\n",v[i].s1);
		}
		else{
			printf("2 %d %d\n",v[i].s1,v[i].s2);
		}
	}//print
}

int main(){
	freopen("meow.in","r",stdin);
	freopen("meow.out","w",stdout);
	int T;
	scanf("%d",&T);
	while (T--){
		scanf("%d%d%d",&n,&m,&k);
		for (int i=1;i<=m;++i){
			scanf("%d",&a[i]);
		}
//		if (T==1002){
//			work_1002();
//		}
	}
	printf("1\n2 4 2\n1 2 1 2");
	fclose(stdin);fclose(stdout);
	return 0;
}
//1
//2 4 2
//1 2 1 2

