#include <bits/stdc++.h>
using namespace std;
#define float       long double 
#define int         long long
#define ll          long long
#define vi          vector<int> 
#define pii         pair<int,int>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define mp          make_pair
#define pb          push_back
#define sd          second
#define ft          first
#define sz(x)       (int)x.size()
#define all(x)      x.begin(),x.end()
#define alr(x)      x.rbegin(),x.rend()       
#define endl        '\n'
#define cnl         cout<<endl;
#define ms(x,v)     ((x), v, sizeof((x)))
#define loop(i,a,b)  for(int i = a; i < b ; i++)
#define printvec(v) for(int tt = 0; tt < sz(v);tt++) cout << v[tt] << " ";
#define inputvec(v) for(int tt = 0;tt  < sz(v); tt++) cin >> v[tt];
#define CASET       int ___T; scanf("%lld", &___T); for(int cs = 1; cs <= ___T; cs++)
const int N =  300 * 1000 + 9;
const ll maxi = 3e9 + 10;
// const int  inf = 1e18;
const int mod = 998244353;
#define pi  3.141592653589793238
void HakunaMatata(/*int tt*/){
      int n; cin >> n ;
      vector<int> v(n);
      for(int i= 0;i < n;i++){
        cin >> v[i];
      }
      cout << (n/2)*6 << endl;
      for(int i = 0;i < n;i=i+ 2){
              cout << 1 << " " << i+1<< " " << i+2 << endl;
              cout << 2 << " " << i+1 << " " << i+2 << endl;
              cout << 1 << " " << i+1 << " " << i+2 << endl;
              cout << 1 << " " << i+1 << " " << i+2 << endl;
              cout << 2 << " " << i+1 << " " << i+2 << endl;
              cout << 1 << " " << i+1<< " " << i+2 << endl;
          }

  return ;     
}
   
  
    signed main(){
         #ifndef ONLINE_JUDGE 
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
       // cout << "HELLO" << endl;
      //init();
          CASET
       // int t = 1; cin >> t;
       // int tt = 1;
       // while(t--){
         // HakunaMatata(tt);
         HakunaMatata();
       //   tt++;
       // }
     
    
        
    
    
       
    return 0;
}