#include<cstdio>
#include<algorithm>
#include<iostream>
#define ll long long
using namespace std;

ll t,n;
ll a[100005];
ll ans[100005][5],tot;

int main()
{
	//freopen("1.in","r",stdin);
	cin>>t;
	while (t--)
	{
		ll p=0,maxn=9999999999;
		cin>>n;
		for (int i=1; i<=n; i++)
		{
			cin>>a[i];
			if (a[i]<maxn)
			{
				maxn=a[i];
				p=i;
			}
		}
		for (int i=p+1; i<=n; i++)
		{
			a[i]=a[i-1]+1;
			tot++;
			ans[tot][1]=p,ans[tot][3]=maxn;
			ans[tot][2]=i,ans[tot][4]=a[i];
		}
		for (int i=p-1; i>=1; i--)
		{
			a[i]=a[i+1]+1;
			tot++;
			ans[tot][1]=p,ans[tot][3]=maxn;
			ans[tot][2]=i,ans[tot][4]=a[i];
		}
		
		
		cout<<tot<<endl;
		for (int i=1; i<=tot; i++)
		{
			printf("%lld %lld %lld %lld\n",ans[i][1],ans[i][2],ans[i][3],ans[i][4]);
		}
		tot=0;
	}
	return 0;
}

