#include<bits/stdc++.h>

using namespace std;

#define rep(i,a,b)  for(int i = a; i < b; i++)
#define Rep(i,a,b)  for(int i = a, i <= b; i++)
#define int         long long
#define pii         pair<int,int>
#define vi          vector <int>
#define mod         1000000007
#define setbits(x)  __builtin_popcountll(x)
#define zrobits(x)  __builtin_ctzll(x)   //no of zero bits befor the first set bits
#define inf         1e18
#define ps(x,y)     fixed<<setprecision(y)<<x

int gcd(int a, int b) { return (b == 0) ? a : gcd(b, a % b); }
int lcm(int a, int b) { return (a / gcd(a, b)) * b; }

void start()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output1.txt", "w", stdout);
#endif

}





int32_t main()
{
  start();
  int t=1;;
       cin>>t;

  while(t--)
  {
  int n;
  cin>>n;
  int a[n];
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
  }

  int ans=3*n;
  cout<<ans<<endl;
  int k=n/2;
  int pos=0;
  for(int i=1;i<=k;i++)
  {
    int idx1=pos;
    int idx2=pos+1;
    idx1++;
    idx2++;
    pos+=2;
    cout<<1<<" "<<idx1<<" "<<idx2<<endl;
    cout<<2<<" "<<idx1<<" "<<idx2<<endl;
    cout<<1<<" "<<idx1<<" "<<idx2<<endl;
    cout<<2<<" "<<idx1<<" "<<idx2<<endl;
    cout<<1<<" "<<idx1<<" "<<idx2<<endl;
    cout<<2<<" "<<idx1<<" "<<idx2<<endl;
  }

  }
}