#include<bits/stdc++.h>
using namespace std;
#define int long long
#define vi vector<int>
#define vvi vector<vi>
#define vb vector<bool>
#define pii pair<int, int>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define ppb pob_back
#define all(x) x.begin(), x.end()

int binpow(int a, int b);
int binpow(int a, int b, int mod);
int gcd(int a, int b);
int lcm (int a, int b);
int inversemod(int a, int mod);

void subMain() {
    //main part of code
    int n;
    cin>>n;
    vi a(n);
    for(int i=0; i<n; i++) cin>>a[i];
    cout<<(n/2)*6<<'\n';
    for(int i=0, j=1; i<n-1, j<n; i+=2, j+=2) {
        for(int k=0; k<3; k++) {
            cout<<"1 "<<i+1<<' '<<j+1<<'\n';
            cout<<"2 "<<i+1<<' '<<j+1<<'\n';
        }
    }
}

signed main() {
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL); 
    int t;
    cin>>t;
    while(t--) {
        subMain();
    }
    return 0;
}

int binpow(int a, int b) {
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}

int binpow(int a, int b, int mod) {
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = (res * a)%mod;
        a = (a * a)%mod;
        b >>= 1;
    }
    return res%mod;
}

int gcd(int a, int b) {
    if(b==0) return a;
    return gcd(b,a%b);
}

int lcm (int a, int b) {
    return ((a / gcd(a, b)) * b);
}

int inversemod(int a, int mod) {
    return binpow(a, mod-2, mod);
}