#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<map>

#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define ll long long
#define endl "\n"
#define pii pair<int,int>
#define pb push_back
#define debug(x) cout << "visit:" << x << endl
#define inf 2147483647

using namespace std;

const int N = 1e5+5;
int a[N];

struct res
{
	int i, j, x, y;
};

void solve()
{
	vector<res> v;
	int n;
	cin >> n;
	int minn=1e9+7, mink;
	for(int i=1;i<=n;++i)
	{
		cin >> a[i];
		if(a[i]<minn)
		{
			minn = a[i];
			mink = i;
		}
	}
	
	cout << n-1 << endl;
	int cnt = minn+1;
	for(int i=mink-1;i>=1;--i)
	{
		cout << i << " " << mink << " " << cnt++ << " " << minn << endl;
	}
	cnt = minn+1;
	for(int i=mink+1;i<=n;++i)
	{
		cout << mink << " " << i << " " << minn << " " << cnt++ << endl;
	}
}

int main()
{
	fast;
	int t;
	cin >> t;
	while(t--)
	{
		solve();
	}
	return 0;
}

/***********************************************************/
/***********************************************************/
/***** A          CCCCCC       PPPPP       L       ZZZZZZ **/
/**** A A        C            P    P      L           Z  ***/
/*** A   A      C            PPPPPP      L          Z   ****/
/** AAAAAAA     C           P           L         Z    *****/
/* A       A     CCCCCC    P           LLLLL    ZZZZZZ  ****/
/***********************************************************/
/***********************************************************/
