// #pragma GCC optimize("Ofast","inline","-ffast-math")
// #pragma GCC target("avx,sse2,sse3,sse4,mmx")
//#pragma GCC optimize(3)//O3
//#pragma GCC optimize(2)//O2
//#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<map>
#include<set>
//#include<unordered_map>
#include<queue>
#include<cstdio>
#include<vector>
#include<cstring>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<bitset>
#include<fstream>
#define X first
#define Y second
#define best 131 
#define INF 0x3f3f3f3f3f3f3f3f
#define pii pair<int,int>
#define lowbit(x) x & -x
#define inf 0x3f3f3f3f
#define max(a,b) a>b?a:b
#define min(a,b) a<b?a:b
//#define int long long
//#define double long double
//#ifndef ONLINE_JUDGE  freopen("data.in.txt","r",stdin);
//freopen("data.out.txt","w",stdout); #endif //文件读取 
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const double pai=acos(-1.0);
const int Mod=998244353;
const double eps=1e-9;
const int N=26;
const int mod=51123987;
const int maxn=1e6+10;

/*--------------------------------------------*/ 
inline int read()
{
    int data=0,w=1; char ch=0;
    while(ch!='-' && (ch<'0' || ch>'9')) ch=getchar();
    if(ch=='-') w=-1,ch=getchar();
    while(ch>='0' && ch<='9') data=data*10+ch-'0',ch=getchar();
    return data*w;
}
/*--------------------------------------------*/

int t,n,m,a[maxn];
string s;

int main()																						
{	
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>t;
	while(t--)
	{
		cin>>n;
		for(int i=1;i<=n;i++)
			cin>>a[i];
		cout<<n*3<<endl;
		for(int i=1;i<=n;i+=2)
		{
			cout<<2<<' '<<i<<' '<<i+1<<endl;
			cout<<1<<' '<<i<<' '<<i+1<<endl;
			cout<<1<<' '<<i<<' '<<i+1<<endl;
			cout<<2<<' '<<i<<' '<<i+1<<endl;
			cout<<1<<' '<<i<<' '<<i+1<<endl;
			cout<<1<<' '<<i<<' '<<i+1<<endl;
		}
	}
	return 0;
}