#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int tt;
    cin >> tt;
    while (tt--)
    {
        int n, mi = INFINITY, p = 0, ma = 2 * 1000000000;
        cin >> n;
        vector <int> a(n + 1);
        for (int i = 1; i <= n; i++)
        {
            cin >> a[i];
            if (a[i] < mi)
            {
                mi = a[i];
                p = i;
            }
        }
        if (n == 1)
        {
            cout << 0 << "\n";
            continue;
        }
        if (1 != p)
        {
        cout << n << "\n";
        cout << 1 << " " << p << " " << mi << " " << ma << "\n";
        a[1] = mi;
        a[p] = ma;
        }
        else
            cout << n - 1 << "\n";
        int next = mi + 1;
        for (int i = 2; i <= n; i++)
        {
            /*if (a[i] == mi)
            {
                cout << 1 << " " << i << " " << a[1] << " " << next++ << "\n";
                continue;
            }*/
            cout << 1 << " " << i << " " << a[1] << " " << next << "\n";
            a[i] = next++;
        }
    }
    return 0;
}
