#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

void solve()
{
    ll n;
    cin >> n;
    
    vector<ll> v(n);
    for (ll i = 0; i < n; i++)
    {
        cin >> v[i];
    }
    
    cout << 3 * n << "\n";
    for (ll i = 0; i < n; i += 2)
    {
        cout << "1 " << (i + 1) << " " << (i + 2) << "\n";
        cout << "2 " << (i + 1) << " " << (i + 2) << "\n";
        cout << "1 " << (i + 1) << " " << (i + 2) << "\n";
        cout << "1 " << (i + 1) << " " << (i + 2) << "\n";
        cout << "2 " << (i + 1) << " " << (i + 2) << "\n";
        cout << "1 " << (i + 1) << " " << (i + 2) << "\n";
    }
}

int main()
{
    int testcase;
    cin >> testcase;

    while (testcase--)
    {
        solve();
    }
    return 0;
}
