#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<queue>
#include<algorithm>
//typedef long long ll;
#define mst(a,b) memset(a,b,sizeof(a))
#define rd read()
#define int long long
#define pos(i,a,b) for(int i=(a);i<=(b);i++)
#define neg(i,a,b) for(int i=(a);i>=(b);i--)
const int Max=200010;
const int inf=0x7f7f7f7f;
const int M=1e5+3;
using namespace std;

inline int read()
{
    int x=0,k=1; char c=getchar();
    while(c<'0'||c>'9'){if(c=='-')k=-1;c=getchar();}
    while(c>='0'&&c<='9')x=(x<<3)+(x<<1)+(c^48),c=getchar();
    return x*k;
}
int t,n,a[Max];
signed main()
{
    t=rd;
    while(t--)
    {
        n=rd;
        int minn=inf,tr=0;
        pos(i,1,n) 
        {
            a[i]=rd;
        }
        pos(i,1,n)
        {

            if(a[i]<minn)
            {
                minn=a[i];
                tr=i;
            }
        }
        if(tr==1)
        {
            printf("%lld\n",n-1);
        }
        else 
        {
            printf("%lld\n",n);
            printf("%d %lld %lld %lld\n",1,tr,minn,a[1]);
            a[tr]=a[1];
            a[1]=minn;
        }
        pos(i,2,n)
        {
            printf("%d %lld %lld %lld\n",1,i,minn,a[i-1]+1);
            
            a[i]=a[i-1]+1;
        }
    }
    return 0;
}
