#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
void solve(void);
int main(){
int t;
cin>>t;
while(t--){
 solve();
}


return 0;}
void solve(){
ll n,i;
cin>>n;
ll a[n+1];
for(i=1;i<=n;i++)
{cin>>a[i];

}
cout<<3*n<<endl;
for(i=1;i<n;i++)
{

cout<<"1"<<" "<<i<<" "<<i+1<<endl;
    cout<<"2"<<" "<<i<<" "<<i+1<<endl;
    cout<<"1"<<" "<<i<<" "<<i+1<<endl;
    cout<<"2"<<" "<<i<<" "<<i+1<<endl;
    cout<<"1"<<" "<<i<<" "<<i+1<<endl;
cout<<"2"<<" "<<i<<" "<<i+1<<endl;
i++;

}

}
