#include<bits/stdc++.h>

using namespace std;

int main()
{
	int t=1;
	cin>>t;
	while(t--)
	{
	    int n;
		cin>>n;
		int a[n];
		for(int i=0; i<n; i++) cin>>a[i];
		cout<<6*(n/2)<<endl;
		for(int i=1; i<=n; i+=2){
			cout<<"1 "<<i<<" "<<i+1<<"\n";
			cout<<"2 "<<i<<" "<<i+1<<"\n";
			cout<<"1 "<<i<<" "<<i+1<<"\n";
			cout<<"1 "<<i<<" "<<i+1<<"\n";
			cout<<"2 "<<i<<" "<<i+1<<"\n";
			cout<<"1 "<<i<<" "<<i+1<<"\n";
		}
	}
	return 0;
}