Problem: <image>

While trading on his favorite exchange trader William realized that he found a vulnerability. Using this vulnerability he could change the values of certain internal variables to his advantage. To play around he decided to change the values of all internal variables from a_1, a_2, …, a_n to -a_1, -a_2, …, -a_n. For some unknown reason, the number of service variables is always an even number.

William understands that with his every action he attracts more and more attention from the exchange's security team, so the number of his actions must not exceed 5 000 and after every operation no variable can have an absolute value greater than 10^{18}. William can perform actions of two types for two chosen variables with indices i and j, where i < j:

  1. Perform assignment a_i = a_i + a_j 
  2. Perform assignment a_j = a_j - a_i 

William wants you to develop a strategy that will get all the internal variables to the desired values.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 20). Description of the test cases follows.

The first line of each test case contains a single even integer n (2 ≤ n ≤ 10^3), which is the number of internal variables.

The second line of each test case contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^9), which are initial values of internal variables.

Output

For each test case print the answer in the following format:

The first line of output must contain the total number of actions k, which the strategy will perform. Note that you do not have to minimize k. The inequality k ≤ 5 000 must be satisfied. 

Each of the next k lines must contain actions formatted as "type i j", where "type" is equal to "1" if the strategy needs to perform an assignment of the first type and "2" if the strategy needs to perform an assignment of the second type. Note that i < j should hold.

We can show that an answer always exists.

Example

Input


2
4
1 1 1 1
4
4 3 1 2


Output


8
2 1 2
2 1 2
2 1 3
2 1 3
2 1 4
2 1 4
1 1 2
1 1 2
8
2 1 4
1 2 4
1 2 4
1 2 4
1 3 4
1 1 2
1 1 2
1 1 4

Note

For the first sample test case one possible sequence of operations is as follows:

  1. "2 1 2". Values of variables after performing the operation: [1, 0, 1, 1] 
  2. "2 1 2". Values of variables after performing the operation: [1, -1, 1, 1] 
  3. "2 1 3". Values of variables after performing the operation: [1, -1, 0, 1] 
  4. "2 1 3". Values of variables after performing the operation: [1, -1, -1, 1] 
  5. "2 1 4". Values of variables after performing the operation: [1, -1, -1, 0] 
  6. "2 1 4". Values of variables after performing the operation: [1, -1, -1, -1] 
  7. "1 1 2". Values of variables after performing the operation: [0, -1, -1, -1] 
  8. "1 1 2". Values of variables after performing the operation: [-1, -1, -1, -1] 



For the second sample test case one possible sequence of operations is as follows:

  1. "2 1 4". Values of variables after performing the operation: [4, 3, 1, -2] 
  2. "1 2 4". Values of variables after performing the operation: [4, 1, 1, -2] 
  3. "1 2 4". Values of variables after performing the operation: [4, -1, 1, -2] 
  4. "1 2 4". Values of variables after performing the operation: [4, -3, 1, -2] 
  5. "1 3 4". Values of variables after performing the operation: [4, -3, -1, -2] 
  6. "1 1 2". Values of variables after performing the operation: [1, -3, -1, -2] 
  7. "1 1 2". Values of variables after performing the operation: [-2, -3, -1, -2] 
  8. "1 1 4". Values of variables after performing the operation: [-4, -3, -1, -2] 

Solution (in CPP):

Solution:
#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;
}