#include <bits/stdc++.h>
#define For(i, a, b) for (int i = a; i <= b; ++ i)
#define Rof(i, a, b) for (int i = a; i >= b; -- i)
#define IOS ios :: sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define pb push_back
#define mp make_pair
#define fi first
#define se second
typedef long long ll;
using namespace std;							
const int N = 1005, mod = 998244353, dx[4] = {-1, 1, 0, 0}, dy[4] = {0, 0, -1, 1}, inf = 1e9;
const ll infll = 1e18;
inline int read() { char c = getchar(); int x = 0, f = 1; while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); } return x * f; }
inline ll updiv(ll a, ll b) { return a / b + (a % b > 0); } // divided a by b rounded up
inline ll qpow(ll a, ll b) { ll ans = 1; for (; b; b >>= 1, a = a * a % mod) if (b & 1) ans = ans * a % mod; return ans; }
int n,m,a[N],b[N],c[N];
char s[N];
int main() {
	int T;
	cin>>T;
	while(T--){
		cin>>n;
		For(i,1,n)cin>>a[i];
		printf("%d\n",3*n);
		For(i,1,n/2){
			int x=i*2-1,y=x+1;
			printf("1 %d %d\n",x,y);
			printf("2 %d %d\n",x,y);
			printf("1 %d %d\n",x,y);
			printf("1 %d %d\n",x,y);
			printf("2 %d %d\n",x,y);
			printf("1 %d %d\n",x,y);
		}
	}
	return 0;
}
