//DAILY HUSTLE MORE
#include<bits/stdc++.h>
using namespace std;
#define   int             long long
#define   f(a,b,n)        for(int  a=b;a<n;a++)
#define   readarr(arr,n)  f(i,0,n) cin>>arr[i];
#define   ll              long long
#define   pb              push_back
#define   go              ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define   ms(a,i)         memset(a,i,sizeof(a))
#define   mod             1e9+7
#define   w(t)            int t=1; cin>>t; while(t--)
#define   MOD             1000000007
#define   setbits(x)      __builtin_popcountll(x)
#define   zrobits(x)      __builtin_ctzll(x)
#define   all(x)          x.begin(), x.end()
#define   gcd(x,y)          __gcd(x,y)
#define   vi              vector<int>
#define   vvi             vector<vector<int>>
#define   mi             map<int,int>
#define   pi              pair<int,int>
#define   vpi             vector<pi>
#define   si              set<int>
#define   MSETI           multiset<int>
#define   inf             1e18
#define   ff              first
#define   ss              second
#define   ps(x,y)         fixed <<setprecision(y)<< x
#define   yes             cout <<"YES" << endl
#define   no              cout <<"NO" << endl
#define   impossible      cout << -1 << endl
#define   endl            "\n"
#define   mp(x,y)         make_pair(x,y)

// ----------------ON A MISSION --------------- //
void pseudo()
{
  go;
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}

long long hcf(long long a, long long b)
{
  if (b == 0)  return a;
  a %= b;
  return
    hcf(b, a);
}

long long lcm(long long a, long long b)
{
  return (a * b) / hcf(a, b);
}

//---------------------------------------------------------------------------------------------------------------//
void solA()
{
  int n , m ;
  cin >> n >> m ;
  string H ;
  cin >> H ;
  //
  int o = 0 , z = 0 ;

  f(i, 0, n)
  {
    if (H[i] == '1') o++ ;
    else
      z++ ;
  }
  // indices i−1 and i+1.
  vi  dp(n);

  f(i, 0, n)
  {
    if (H[i] == '1')
    {
      dp[i] = 0;
    }
    else
    {
      dp[i]++;
      if (i > 0)
      {
        dp [i] = dp[i] + dp[i - 1] ;
      }
    }
  }
  int end = n ;
  f(i, 0, n)
  {
    if (H[i] == '1')
    {
      end  = i;
      break;
    }
  }

  f(i, end , n - 1)
  {

    if (dp[i] > 0 and dp[i + 1] == 0)
    {
      int  st = i + 1 - dp[i]  ;
      int  mid  = dp[i] / 2;
      mid = min(m , mid) ;

      f(j, st, st + mid)
      {
        H[j] = '1';
      }
      for (int  k = i;  k > i - mid;  k--)
      {
        H[k] = '1';
      }
    }
  }

  ////
  if (end < n)
  {
    int M = m;
    for (int  k = end  - 1; k >= 0 and M--; k--)
    {
      H[k] = '1';
    }
  }
  if (dp[n - 1] > 0 and dp[n - 1] < n)
  {
    int best  = n - 1 - dp[n - 1] + 1;
    for (int j = best ; j < best + m and  j < n; j++)
    {
      H[j] = '1';
    }
  }
  cout << H << "\n" ;
}


void solB()
{
  int n, i;
  cin >> n;
  int a[n + 1];
  for (i = 1; i <= n; i++) cin >> a[i];
  cout << 3 * n << endl;
  for (i = 1; i <= n / 2; i++)
  {
    int  j = n / 2 + i;
    cout << "1 " << i << " " << j << endl;
    cout << "2 " << i << " " << j << endl;
    cout << "1 " << i << " " << j << endl;
    cout << "2 " << i << " " << j << endl;
    cout << "1 " << i << " " << j << endl;
    cout << "2 " << i << " " << j << endl;
  }

}
//-------------------------------------------------------------------------------------------------------------//


int32_t main()
{
  pseudo() ;
  int t ;
  cin >> t ;
  //t = 1 ;
  while (t--)
  {
    solB() ;
  }



  return 0;
}
