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 PYTHON3):

Solution:
#===========Template===============
from io import BytesIO, IOBase
from math import sqrt
import sys,os
from os import path
inpl=lambda:list(map(int,input().split()))
inpm=lambda:map(int,input().split())
inpi=lambda:int(input())
inp=lambda:input()
rev,ra,l=reversed,range,len

P=print
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
def input(): return sys.stdin.readline().rstrip("\r\n")

def B(n):
    return bin(n).replace("0b","")

def factors(n):
    arr=[]
    for i in ra(2,int(sqrt(n))+1):
        if n%i==0:
            arr.append(i)
            if i*i!=n:
                arr.append(int(n/i))
    return arr 

def prime_factors(n):
    omap={2:0}
    while n!=1 and n%2==0:
        omap[2]+=1
        n/=2
    
    for i in ra(3,int(math.sqrt(n))+1,2):
        while n!=1 and n%i==0:
            if i not in omap:omap[i]=1
            else:omap[i]+=1
            n/=i
    if n!=1:
        omap[int(n)]=1
    return omap 

def dfs(arr,n):
    pairs=[[i+1] for i in ra(n)]
    vis=[0]*(n+1)
    for i in ra(l(arr)):
        pairs[arr[i][0]-1].append(arr[i][1])
    pairs[arr[i][1]-1].append(arr[i][0])
    
    comp=[]
    for i in ra(n):
        stack=[pairs[i]]
        temp=[]
        if vis[stack[-1][0]]==0: 
            while len(stack)>0:
                if vis[stack[-1][0]]==0:
                    temp.append(stack[-1][0])
                    vis[stack[-1][0]]=1
                    s=stack.pop()
                    for j in s[1:]:
                        if vis[j]==0:
                            stack.append(pairs[j-1])
                else:
                    stack.pop()
            comp.append(temp)
    return comp
    
  
#=========I/p O/p ========================================#
from bisect import bisect_left as bl 
from bisect import bisect_right as br
import sys,operator,math,operator
from collections import Counter 
if(path.exists('input.txt')):
    sys.stdin = open("input.txt","r")
    sys.stdout = open("output.txt","w")
import random
#==============To chaliye shuru krte he ====================#
tc=inpi()
while tc:
    tc -= 1 
    n=inpi()
    li=inpl()
    P(int(6*(n//2)))
    for i in ra(0,n,2):
        P(1,i+1,i+2)
        P(2,i+1,i+2)
        P(1,i+1,i+2)
        P(1,i+1,i+2)
        P(2,i+1,i+2)
        P(1,i+1,i+2)