#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);

using namespace std;
typedef long long ll;

void onetest() {
    int n;
    cin >> n;
    std::vector<int> v;
    for (int i = 0;i<n;i++) {
        int e;
        cin >> e;
        v.push_back(e);
    }
    cout << 6*(n/2) <<"\n";
    for (int i = 0;i<n/2;i++) { 
        int l = i+1;
        int r = v.size()-i;   
        cout << "1 " << l << " " << r << "\n";
        cout << "2 " << l << " " << r << "\n";
        cout << "1 " << l << " " << r << "\n";
        cout << "1 " << l << " " << r << "\n";
        cout << "2 " << l << " " << r << "\n";
        cout << "1 " << l << " " << r << "\n";        
    }
}
int main() {
    int n;
    cin >> n;
    for (int i = 0;i<n;i++) {
        onetest();
    }
    return 0;
}
    
