#include <bits/stdc++.h>
using namespace std;
int main() {
    int T;
    cin>>T;
    while(T--){
        int N;
        cin>>N;
        long long int A[N];
        for(int i=0;i<N;i++){cin>>A[i];}
        cout<<3*N<<"\n";
        for(int i=0;i<N;i+=2){
            cout<<2<<" "<<i+1<<" "<<i+2<<"\n"; 
            cout<<1<<" "<<i+1<<" "<<i+2<<"\n"; 
            cout<<2<<" "<<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"; 
        }
    }
    return 0;
}
