#include<iostream>
using namespace std;
int t,n,s,r;
int main()
{
    cin>>t;
    for(int i=0;i<t;i++)
    {
        cin>>n;
        for(int k=0;k<n;k++)
        {
            cin>>r;
        }
        cout<<3*n<<endl;
        for(int j=0;j<n-1;j=j+2)
        {
            cout<<"1"<<" "<<j+1<<" "<<j+2<<endl;
            cout<<"2"<<" "<<j+1<<" "<<j+2<<endl;
            cout<<"2"<<" "<<j+1<<" "<<j+2<<endl;
            cout<<"1"<<" "<<j+1<<" "<<j+2<<endl;
            cout<<"2"<<" "<<j+1<<" "<<j+2<<endl;
            cout<<"2"<<" "<<j+1<<" "<<j+2<<endl;
        }
    }
    return 0;
}