#include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1e9 + 7;
const int N = 3e5 + 10;

void solve() {
  int n;
  cin >> n;
  vector<int>v(n);
  for(auto &e : v) {
    cin >> e;
  } 
  cout << (n / 2) * 6 << "\n";
  int c = 0;
  for(int i = 1; i <= n; i += 2) {
    cout << 1 << " " << i << " " << i + 1 << "\n";
    cout << 2 << " " << i << " " << i + 1 << "\n";
    cout << 1 << " " << i << " " << i + 1 << "\n";
    cout << 1 << " " << i << " " << i + 1 << "\n";
    cout << 2 << " " << i << " " << i + 1 << "\n";
    cout << 1 << " " << i << " " << i + 1 << "\n"; 
    c += 7;
  }
  // cout << c << "\n";
}

int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int tc = 1;
  cin >> tc;
  while(tc--) {
    solve();
  }
  return 0;
}