#include <bits/stdc++.h>
#define sz(x) (int)x.size()
#define chmax(x, v) x = max(x, v)
#define chmin(x, v) x = min(x, v)
#define all(x) x.begin(), x.end()
#define pb push_back
#define pii pair<int, int>
#define int long long
using namespace std;

void solve(){
	int nVals; cin >> nVals;
	vector<int> vals(nVals);
	for (int& val : vals)
		cin >> val;
	cout << 3 * nVals << endl;
	for (int i = 0; i < nVals; i += 2){
		for (int j = 0; j < 3; ++j){
			cout << 1 << " " << i + 1 << " " << i + 2 << endl;
			vals[i] += vals[i + 1];
			cout << 2 << " " << i + 1<< " " << i + 2 << endl;
			vals[i + 1] -= vals[i];
		}
	}
}

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int t = 1; cin >> t;
	while (t--)
		solve();
	return 0;
}