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 <array>
#include <bitset>
#include <deque>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <iterator>
#include <array>
#include <tuple>
#include <string>
#include <fstream>
#include <iomanip>
#include <random>
#include <numeric>
#include <new>
#include <sstream>
#include <streambuf>
#include <cstring>
using namespace std;

#define ar array
#define ss second
#define ll long long
#define ff first
#define ull unsigned long long
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(a) (int)a.size()
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pr pair
#define vi vector<int>
#define vl vector<ll>
#define vt vector
#define pb push_back
#define mp make_pair
string to_string(char c) {
    return string(1, c);
}
string to_string(bool b) {
    return b ? "true" : "false";
}
string to_string(const char* s) {
    return string(s);
}
string to_string(string s) {
    return s;
}
string to_string(vector<bool> v) {
    string res;
    for (int i = 0; i < sz(v); ++i) res += char('0' + v[i]);
    return res;
}

template<size_t S> string to_string(bitset<S> b) {
    string res;
    for (int i = 0; i < S; ++i) res += char('0' + b[i]);
    return res;
}
template<class T> string to_string(T v) {
    bool f = 1;
    string res;
    for (int i = 0; i < sz(v); ++i) {
        if (!f) res += ' ';
        f = 0;
        res += to_string(v[i]);
    }
    return res;
}
ll binpow (ll a, ll n, ll m) {
    ll res = 1;
    while (n) {
        if (n & 1) res *= a, res %= m;
        a *= a;
        a %= m;
        n >>= 1;
    }
    return res;
}
ll __gcd(ll a, ll b) {
    return b ? __gcd(b, a % b) : a;
}
template<class A> void read(vt<A>& v);
template<class A, size_t S> void read(array<A, S>& a);
template<class T> void read(T& x) {
    cin >> x;
}
void read(double& d) {
    string t;
    read(t);
    d = stod(t);
}
void read(long double& d) {
    string t;
    read(t);
    d = stold(t);
}
template<class H, class... T> void read(H& h, T&... t) {
    read(h);
    read(t...);
}
template<class A> void read(vt<A>& x) {
    for (auto& a : x) read(a);
}
template<class A, size_t S> void read(array<A, S>& x) {
    for (auto& a : x) read(a);
}
template<class A> void write(A x) {
    cout << to_string(x);
}
template<class H, class... T> void write(const H& h, const T&... t) {
    write(h);
    write(t...);
}
void print() {
    write("\n");
}
template<class H, class... T> void print(const H& h, const T&... t) {
    write(h);
    if (sizeof...(t))
        write(' ');
    print(t...);
}
void DBG() {
    cerr << "]" << endl;
}
template<class H, class... T> void DBG(H h, T... t) {
    cerr << to_string(h);
    if (sizeof...(t))
        cerr << ", ";
    DBG(t...);
}
#ifdef _DEBUG
#define dbg(...) cerr << "LINE(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#else
#define dbg(...) 0
#endif
const int MOD = 1e9 + 7; //1073741824;
const int N = 2e6 + 5;
const ll INF = 9e18;
const int M = 3e3 + 5;

int a[N];
struct ans {
    int type, i, j;
};
void solve() {
    int n;
    cin >> n;
    for(int i = 1; i <= n; ++i) cin >> a[i];
    vt<ans> A;
    for(int i = 1; i <= n / 2; ++i) {
        ans cur;
        cur.type = 1, cur.i = i, cur.j = n - i + 1;
        A.pb(cur);
        a[cur.i] += a[cur.j];
        cur.type = 2;
        A.pb(cur), A.pb(cur);
        a[cur.j] -= a[cur.i] * 2;
        cur.type = 1;
        A.pb(cur);
        a[cur.i] += a[cur.j];
        cur.type = 2;
        A.pb(cur);
        a[cur.j] -= a[cur.i];
        A.pb(cur);
        a[cur.j] -= a[cur.i];
    }
   /* for(int i = 1; i <= n; ++i) cout << a[i] << " ";
    cout << "\n";*/
    cout << sz(A) << "\n";
    for(auto x : A) cout << x.type << " " << x.i << " " << x.j << "\n";
}
int main() {
    /*freopen(".in", "r", stdin);
    freopen(".out", "w", stdout);*/
    // for(int i s)
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t = 1;
     cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

// a b a a b b a b
// 0 1 1 1 3 3 3 4