#include<bits/stdc++.h>
#define rep(i,st,en) for(int i=st;i<=en;i++)

using namespace std;
typedef long long ll;
int t,x,y,i,n;

int main()
{
	scanf("%d",&t);
	while(t--)
	{
		scanf("%d",&n);
		rep(i,1,n)scanf("%d",&x);
		printf("%d\n",3*n);
		rep(i,1,n/2)
		{
			x=2*i-1;
			y=2*i;
			printf("2 %d %d\n",x,y);
			printf("2 %d %d\n",x,y);
			printf("1 %d %d\n",x,y);
			printf("2 %d %d\n",x,y);
			printf("2 %d %d\n",x,y);
			printf("1 %d %d\n",x,y);
		}
		//TODO
	}
	return 0;
}
