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

Solution:
import java.util.*;
import java.io.*;
import java.util.stream.*;

public class P2 {
    private static class Pair<K, V>{
        K k;
        V v;
    
        Pair(K k, V v){
            this.k = k;
            this.v = v;
        }
    
        public K getKey() {
            return k;
        }
    
        public V getValue() {
            return v;
        }
    }
    
    private static class Disj{
        private int[] parent;
        private int components;
        Disj(int n){
            parent = new int[n];
            components = n;
            make_set();
        }
    
        private void make_set(){
            for (int i = 0; i < parent.length; i++) {
                parent[i] = i;
            }
        }
    
        public void union(int a, int b) {
            a = find(a);
            b = find(b);
            if(a != b) {
                parent[a] = b;
                components--;
            }
        }
    
        public int find(int x) {
            if(x != parent[x]){
                parent[x] = find(parent[x]);
            }
    
            return parent[x];
        }
    
        public int getComponentCount() {
            return components;
        }
    }
    
    private static class FastReader {
        private BufferedReader br;
        private StringTokenizer st;
    
        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }
    
        public FastReader(String inp) throws FileNotFoundException{
            try{
                br = new BufferedReader(new FileReader(inp));
            } catch(Exception e){
                br = new BufferedReader(new InputStreamReader(System.in));
            }
        }
    
        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
    
        int nextInt() { return Integer.parseInt(next()); }
    
        long nextLong() { return Long.parseLong(next()); }
    
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
    
        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArr(int n){
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = Integer.parseInt(next());
            }
            return arr;
        }

        char[] nextCharArr(int n){
            char[] arr = new char[n];
            for (int i = 0; i < n; i++) {
                arr[i] = next().charAt(0);
            }
            return arr;
        }

        String[] nextStringArr(int n){
            String[] arr = new String[n];
            for (int i = 0; i < n; i++) {
                arr[i] = next();
            }
            return arr;
        }
    }
    
    private static class Display{
        BufferedWriter bw;
        Display(){
            bw = new BufferedWriter(new OutputStreamWriter(System.out));
        }

        public void flushOutput(){
            try {
                bw.flush();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void println(){
            try {
                bw.write("\n");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void println(String output){
            try {
                bw.write(output + "\n");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void println(int output){
            try {
                bw.write(output + "\n");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void println(long output){
            try {
                bw.write(output + "\n");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void println(char output){
            try {
                bw.write(output + "\n");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void print(String output){
            try {
                bw.write(output);
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void print(int output){
            try {
                bw.write(output + "");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void print(long output){
            try {
                bw.write(output + "");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void print(char output){
            try {
                bw.write(output);
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public void printMatrix(int[][] arr) throws IOException{
            for (int i = 0; i < arr.length; i++) {
                for (int j = 0; j < arr[i].length; j++) {
                    print(arr[i][j] + " ");
                }
                println();
            }
            println();
        }
    
        public void printMatrix(String[][] arr){
            for (int i = 0; i < arr.length; i++) {
                for (int j = 0; j < arr[i].length; j++) {
                    print(arr[i][j] + " ");
                }
                println();
            }
            println();
        }
    
        public void printMatrix(char[][] arr){
            for (int i = 0; i < arr.length; i++) {
                for (int j = 0; j < arr[i].length; j++) {
                    print(arr[i][j] + " ");
                }
                println();
            }
            println();
        }
    
        public void printArr(int[] arr){
            for (int i = 0; i < arr.length; i++) {
                print(arr[i] + " ");
            }
            println();
        }
    
        public void printArr(String[] arr){
            for (int i = 0; i < arr.length; i++) {
                print(arr[i] + " ");
            }
            println();
        }
    
        public void printArr(char[] arr){
            for (int i = 0; i < arr.length; i++) {
                print(arr[i] + " ");
            }
            println();
        }

        public void printList(List li){
            for (int i = 0; i < li.size(); i++) {
                print(li.get(i) + " ");
            }
            println();
        }
    }

    static class Utils {
        static int mod = (int)1e9 + 7;
        static int[] dir = {0, 1, 0, -1, 0};
        static int[][] dirs = {{1,0},{-1,0},{0,1},{0,-1}};

        static long add(long x, long y){
            long res = x + y;
            return (res >= mod ? res - mod : res);
        }

        static long mul(long x, long y){
            long res = x * y;
            return (res >= mod ? res % mod : res);
        }

        static long sub(long x, long y){
            long res = x - y;
            return (res < 0 ? res + mod : res);
        }

        static long pow(long x, long y){
            long res = 1;
            x %= mod;
            while(y > 0){
                if((y & 1) != 0){
                    mul(res, x);
                    y >>= 1;
                    x = mul(x, x);
                }
            }
            return res;
        }

        static long lcm(long x, long y){
            long res = x / gcd(x, y);
            return res * y;
        }

        static long gcd(long x, long y){
            if(x == 0){
                return y;
            }
            return gcd(y % x, x);
        }

        static int add(int x, int y){
            int res = x + y;
            return (res >= mod ? res - mod : res);
        }

        static int mul(int x, int y){
            int res = x * y;
            return (res >= mod ? res % mod : res);
        }

        static int sub(int x, int y){
            int res = x - y;
            return (res < 0 ? res + mod : res);
        }

        static int pow(int x, int y){
            int res = 1;
            x %= mod;
            while(y > 0){
                if((y & 1) != 0){
                    mul(res, x);
                    y >>= 1;
                    x = mul(x, x);
                }
            }
            return res;
        }

        static int lcm(int x, int y){
            int res = x / gcd(x, y);
            return res * y;
        }

        static int gcd(int x, int y){
            if(x == 0){
                return y;
            }
            return gcd(y % x, x);
        }
    }

    private static FastReader r;
    private static Display d;
    public static void main(String[] args) throws FileNotFoundException {
        r = new FastReader("input.txt");
        d = new Display();

        int t = r.nextInt();
        while(t-- > 0) {
            solve();
        }

        d.flushOutput();
    }
    
    private static void solve(){
        int n = r.nextInt();
        int[] arr = r.nextIntArr(n);

        d.println(3 * n);
        for(int i = 1; i <= n; i+=2){
            d.println(2 + " " + i + " " + (i + 1));
            d.println(2 + " " + i + " " + (i + 1));
            d.println(1 + " " + i + " " + (i + 1));
            d.println(2 + " " + i + " " + (i + 1));
            d.println(2 + " " + i + " " + (i + 1));
            d.println(1 + " " + i + " " + (i + 1));
        }
    }
}