	// author: sharad12arse
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define ull unsigned long long
#define gcd __gcd
#define INF (ll)1e15

void solve(){
	int n;
	cin>>n;
	vector<int> arr(n);
	for(int i=0;i<n;i++){
		cin>>arr[i];
	}
	cout<<3*n<<"\n";
	for(int i=0;i<n;i+=2){
		cout<<"1 "<<i+1<<" "<<i+2<<"\n";
		cout<<"2 "<<i+1<<" "<<i+2<<"\n";
		cout<<"1 "<<i+1<<" "<<i+2<<"\n";
		cout<<"2 "<<i+1<<" "<<i+2<<"\n";
		cout<<"1 "<<i+1<<" "<<i+2<<"\n";
		cout<<"2 "<<i+1<<" "<<i+2<<"\n";
	}
}

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int t=1;
	cin>>t;
	while(t--){
		solve();
	}
	// cerr<<"time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl;
}