#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define YES cout << "YES\n"
#define NO cout << "NO\n"
#define nn "\n"
#define mod 1000000007
#define N 100005

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

    int t;
    cin >> t;
    while(t--)
    {
        ll n,a,b,mn=10000000000,i,j;
        cin >> n;
        for(i=0;i<n;i++)
        {
            cin >> a;
            if(a<mn)
            {
                mn=a;
                j=i;
            }
        }
        b=mn;
        cout << n-1 << nn;
        for(i=j-1;i>=0;i--)
        {
            cout << i+1 << " " << j+1 << " " << ++b << " " << mn << nn;
        }
        b=mn;
        for(i=j+1;i<n;i++)
        {
            cout << i+1 << " " << j+1 << " " << ++b << " " << mn << nn;
        }
    }
    return 0;
}