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 <iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<cmath>
#include<map>

using namespace std;
#define ll long long
const long double pi = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679;
struct node {
private:
    ll ans = 0;
    node *left = nullptr;
    node *right = nullptr;
public:
    void update(ll l, ll r, ll idx, ll x) {
        if (r - l == 1) {
            ans = max(ans, x);
            return;
        }
        ll m = (l + r) / 2;
        ll L = 0, R = 0;
        if (idx < m) {
           if (left == nullptr)
               left = new node;
           left->update(l, m, idx, x);
           L = left->ans;
        } else {
            if (right == nullptr)
                right = new node;
            right->update(m, r, idx, x);
            R = right->ans;
        }
        if (left != nullptr)
            L = left->ans;
        if (right != nullptr)
            R = right->ans;
        ans = max(L, R);
    }
    ll get(ll l, ll r, ll ql, ll qr) {
        if (ql <= l && r <= qr) {
            return ans;
        }
        if (ql >= r || l >= qr)
            return 0;
        ll m = (l + r) / 2;
        ll ret = 0;
        if (!(ql >= m || l >= qr)) {
            if (left != nullptr)
                ret = max(ret, left->get(l, m, ql, qr));
        }
        if (!(ql >= r || m >= qr)) {
            if (right != nullptr)
                ret = max(ret, right->get(m, r, ql, qr));
        }
        return ret;
    }
};
struct pie {
    ll r, h;
};
long double volume(pie a) {
    return (pi * a.r * a.r) * a.h;
}
ll not_pi_volume(pie a) {
    return (a.r * a.r) * a.h;
}
int main() {
    int tt;
    cin >> tt;
    while (tt--) {
        int n;
        cin >> n;
        vector<ll> arr(n);
        for (int i = 0; i < n; ++i)
            cin >> arr[i];
        cout << 3 * n << "\n";
        for (int i = 0; i < n; i += 2) {
            cout << "2 " << i + 1 << " " << i + 2 << "\n";
            cout << "2 " << i + 1 << " " << i + 2 << "\n";
            cout << "1 " << i + 1 << " " << i + 2 << "\n";
            cout << "2 " << i + 1 << " " << i + 2 << "\n";
            cout << "2 " << i + 1 << " " << i + 2 << "\n";
            cout << "1 " << i + 1 << " " << i + 2 << "\n";
        }
    }
}