#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define v vector
#define pb push_back
#define pub pull_back
#define be begin
#define p pair<ll,ll>
#define f first
#define se second
#define um unordered_map
#define om map
#define us unordered_set
#define tr pair<ll,pair<long long int,long long int>> 
#define Q  queue
#define cp(v1,x,i,n) for(i=0;i<n;i++){v1[i]=x;}
#define lp(i,a,b) for(i=a;i<b;i++)
#define MAXN 10000001
#define pq priority_queue
ll  spf[MAXN];
void seive()
{
spf[1]=1;
for(int i=2;i<MAXN;i++) 
spf[i]=i; 
for(int i=4;i<MAXN;i+=2) 
spf[i]=2; 
for(int i=3;i*i<MAXN;i++) 
{ 
if(spf[i]==i) { 
for(int j=i*i;j<MAXN; j+=i)
if(spf[j]==j) 
spf[j]=i; }
} 

}


ll printDivisors(ll n)
{

    // Note that this loop runs till square root

    for (ll i=2; i<=sqrt(n); i++)
    {

        if (n%i == 0)
          {

            // If divisors are equal, print only one

            if (n/i == i)
             return i;
 

            else // Otherwise print both
              return n/i;

        }

    }
return 1;
    
}
 


v<ll> getFactorization(ll x) 
{
vector<ll> ret; 

while(x!=1) 
{ 
ret.push_back(spf[x]); 
x = x / spf[x]; 
}
return ret; 

}




ll gcd(ll a,ll b)
{
  if(a==0)
   return b;
  if(b==0)
    return a;
    if(a==b)
    return a;
    if(a>b)
    return gcd(a-b,b);
    return gcd(a,b-a);
}



double nthRoot(int A, int N) 
{
 double xPre = rand() % 10; 
   double eps=1e-3; 
   double delX=INT_MAX; 
    double xK; 
    while (delX > eps) 
    { 
     xK=((N-1.0)*xPre+(double)A/pow(xPre,N-1))/(double)N; 
    delX=abs(xK-xPre); 
    xPre=xK; 
    } 
  return xK; 

}

/*--------------------------------------------------------------------------Tree Algo----------------------------------------------------------------------------------*/
/*ll dp[200005][21];
static v<ll> v1[200005];
v<ll> dp1(200005);
map<ll,ll> m;
v<ll> v3;
ll en[200005],st[200005];
set<ll> *ss[200005];
void dfs(ll s,ll p1,v<ll> &v2)
{
  ll c=0,d=0;
      for(ll i=0;i<v1[s].size();i++)
       if(v1[s][i]!=p1)
       {
          dfs(v1[s][i],s,v2);
          if(c<ss[v1[s][i]]->size())
          {
            c=ss[v1[s][i]]->size();
            d=v1[s][i];
          }
        }
        if(d!=0)
        ss[s]=ss[d];
        else 
        ss[s]=new set<ll>();
          ss[s]->insert(v2[s]);
          for(ll i=0;i<v1[s].size();i++)
       if(v1[s][i]!=p1&&v1[s][i]!=d)
       {
         for(auto x:*ss[v1[s][i]])
         ss[s]->insert(x);
       }


       dp1[s]=ss[s]->size();
   
}


//Binary Lifting
void binary_lifting(ll s,ll p1,ll l,v<ll> &le,ll n)
{
   
 // dfs(1,0);
    for(ll i=1;(1<<i)<=n;i++)
       for(ll j=0;j<=n;j++)
       dp[j][i]=(dp[dp[j][i-1]][i-1]);
}

//Heavy Light Decomposition

static v<ll> HLD[200005];
v<ll> seg(200005),pos(200005),par(2501);
ll c=0;
void hld(ll s,ll p1)
{
  ll d=0 ,e=0;
  seg[s]=c;
  pos[s]=HLD[c].size();
  HLD[c].pb(s);
   for(ll i=0;i<v1[s].size();i++)
     {  if(v1[s][i]!=p1)
          {
            if(dp1[v1[s][i]]>d)
            {
              d=dp1[v1[s][i]];
              e=v1[s][i];
            }
          }
       }   
       if(e!=0)
       {
         par[e]=par[s];
       hld(e,s);
       
       }
        for(ll i=0;i<v1[s].size();i++)
         {
           if(v1[s][i]!=p1&&e!=v1[s][i])
           {
               par[v1[s][i]]=s;
               c++;
               hld(v1[s][i],s);
             }
             
           }
        
}


//Binary Indexed Tree

v<v<ll>> BItree(200005);

void updatebit(ll i,ll n,ll  val,ll j)
{
   i++;
   while(i<=n)
   {
     BItree[j][i]+=val;
     i+=i&(-i);
   }
}


ll getbit(ll i,ll j)
{
  ll sum=0;
  i++;
  while(i)
  {   
      sum+=BItree[j][i];
      i-=(i&(-i));
  }
  return sum;
}


void bitree(v<ll> &v2)
{
  for(ll i=0;i<=c;i++)
  {
    for(ll j=0;j<=HLD[i].size();j++)
     BItree[i].pb(0);
       
  }
  for(ll i=0;i<=c;i++)
  {
    for(ll j=0;j<HLD[i].size();j++)
    updatebit(j,HLD[i].size(),v2[HLD[i][j]],i);
  }
}
*/


/*--------------------------------------------------------------------------Tree Algo----------------------------------------------------------------------------------*/

/*v<ll> vis(2501),vis1(2501);
v<p> v2[100001];
ll sum11=-77777;
v<ll> v4[2501];




/*void  dfsg(ll i,ll sum,ll n)
{
  vis[i]=1;
  if(i==n)
  {
    if(sum11==-77777)
    sum11=sum;
    else
    sum11=max(sum11,sum);
    vis[i]=0;
    return;
  }
  if(i!=n)
  for(auto x:v2[i])
  {
    if(!vis[x.f])
    {
      dfsg(x.f,sum+x.se,n);
    }
  }
  vis[i]=0;
}*/




/*
v<ll> dis[100001];
v<pair<ll,ll>> bef[1001];
/*void bfs(ll i)
{
  queue<ll> q;
  dis[i]=0;
  q.push(i);
  vis[i]=1;
  while(!q.empty())
  {
    ll c=q.front();
     q.pop();

     for(auto x:v1[c])
     {
       if(!vis[x])
       {
         vis[x]=1;
         q.push(x);
       }
      }
  }
  
 
}*/
//dijsktra-------------------
/*void dijsktra(ll i,ll k)
{
  pq<p,v<p>,greater<p>> q;   //min  heap
  q.push({0,i});
  
  while(!q.empty())
  {
    p c=q.top();
    q.pop();
    for(auto x:v2[c.se])
    {
      if(dis[x.f][k-1]>c.f+x.se)
      {
        dis[x.f][k-1]=c.f+x.se;
        q.push({dis[x.f][k-1],x.f});
        sort(dis[x.f].begin(),dis[x.f].end());
      }
       
    }
  }
}*/

int main()
{


  ll t=1,pp=0;
   //cin>>t;
    
  /*  static ll p[10000003];
   
    for(ll i=0;i<10000003;i++)
      p[i]=1;

    for(pp=2;pp*pp<=10000003;pp++)
    {
        if(p[pp]==1)
        {
            for(ll i=pp*pp;i<=10000003;i+=pp)
              p[i]=0;
        }
    }
     */
    
cin>>t;

while(t--)
{
ll n,j=0,w,b=0,sum1=0,sum2=0,mina,maxa,e,h=0,g=0,x2=-1,y1,y2=-1,a,l=0,r,l1=0,r1=0,x1=0;
ll sum=0,i=0,y=0,q=0,c=0;
ll d=998244353;

ll k=0,k1=0,u,k2=0,k3=0,k4=0;                                      
ll m;
string s;
cin>>n;
v<ll> v1(n);
lp(i,0,n)
{
  cin>>v1[i];
}
v<tr> v2;
for(i=0;i<n;i++)
{
  v2.pb({2,{i+1,i+2}});
  v2.pb({1,{i+1,i+2}});
  v2.pb({1,{i+1,i+2}});
  v2.pb({2,{i+1,i+2}});
v2.pb({1,{i+1,i+2}});
v2.pb({1,{i+1,i+2}});
i++;
}


cout<<v2.size()<<"\n";
for(auto x: v2)
cout<<x.f<<" "<<x.se.f<<" "<<x.se.se<<"\n";


//cout<<"\n";


}
return 0;
}


 