#include<bits/stdc++.h>
using namespace std;
#define pb emplace_back
#define pf first
#define ps second
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define Endl '\n'
#define codejam cout<<"Case #"<<t<<": ";
#define PI 3.141592653589793238462
#define sz(x) ((int)(x).size())
#define mod 1000000007
#define forn(i,n) for(ll i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double lld;

//////////////////////////////////// DEBUGGER ///////////////////////////////////////////
#ifndef ONLINE_JUDGE
#define debug(x) cerr << #x <<" "; debugger(x); cerr << endl;
#else
#define debug(x)
#endif
void debugger(ll t) {cerr << t;}void debugger(int t) {cerr << t;}void debugger(string t) {cerr << t;}void debugger(char t) {cerr << t;}void debugger(lld t) {cerr << t;}void debugger(double t) {cerr << t;}void debugger(ull t) {cerr << t;}template <class T, class V> void debugger(pair <T, V> p);template <class T> void debugger(vector <T> v);template <class T> void debugger(set <T> v);template <class T, class V> void debugger(map <T, V> v);template <class T> void debugger(multiset <T> v);template <class T, class V> void debugger(pair <T, V> p) {cerr << "{"; debugger(p.pf); cerr << ","; debugger(p.ps); cerr << "}";}template <class T> void debugger(vector <T> v) {cerr << "[ "; for (T i : v) {debugger(i); cerr << " ";} cerr << "]";}template <class T> void debugger(set <T> v) {cerr << "[ "; for (T i : v) {debugger(i); cerr << " ";} cerr << "]";}template <class T> void debugger(multiset <T> v) {cerr << "[ "; for (T i : v) {debugger(i); cerr << " ";} cerr << "]";}template <class T, class V> void debugger(map <T, V> v) {cerr << "[ "; for (auto i : v) {debugger(i); cerr << " ";} cerr << "]";}
ll gcd(ll a,ll b) {if(b==0) return a;return gcd(b,a%b);}

//////////////////////////////////// JAI SHREE RAM /////////////////////////////////////
const ll N=1e5;

void JAISHREERAM()
{
    ll n,ans=0;
    cin>>n;
    vector<ll> a(n);
    forn(i,n) cin>>a[i];
    cout<<6*n/2<<Endl;
    for(int i=1;i<=n;i+=2)
    {
        cout<<1<<" "<<i<<" "<<i+1<<Endl;
        cout<<2<<" "<<i<<" "<<i+1<<Endl;
        cout<<2<<" "<<i<<" "<<i+1<<Endl;
        cout<<1<<" "<<i<<" "<<i+1<<Endl;
        cout<<2<<" "<<i<<" "<<i+1<<Endl;
        cout<<2<<" "<<i<<" "<<i+1<<Endl;
    }
}
int main()
{
    fast;
    int T=1;
    cin>>T;
    for(int t=1;t<=T;t++)
    {
        // codejam
        JAISHREERAM();
    }
    return 0;
}