#include <bits/stdc++.h>
using namespace std;

#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define mod 1000000007
#define mod2 998244353
#define pb push_back
#define all(v) v.begin(),v.end()
#define en "\n"
#define MN INT_MIN
#define MX 100000001
#define fr(i,a,b) for(long long int i=a;i<b;i++)
#define frd(i,b,a) for(long long int i=b;i>a;i--)
#define mem(a,b) memset(a,b,sizeof(a))

typedef long long int ll;




int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ll T = 1;
	cin >> T;
	while (T--)
	{

		ll n;
		cin >> n;
		ll a[n];
		fr(i, 0, n)
		cin >> a[i];
		vector<ll>v;
		ll p1 = 1000000007, p2 = 1000000009;
		fr(i, 0, n - 1)
		{
			ll x = min(a[i], a[n - 1]);
			a[n - 1] = x;
			if (i % 2 == 0)
			{
				v.pb(i + 1);
				v.pb(n);
				v.pb(p1);
				v.pb(x);
			}
			else
			{
				v.pb(i + 1);
				v.pb(n);
				v.pb(p2);
				v.pb(x);
			}
		}

		cout << n - 1 << "\n";
		ll i = 0;
		while (i < v.size())
		{
			cout << v[i] << " " << v[i + 1] << " " << v[i + 2] << " " << v[i + 3] << "\n";
			i += 4;
		}

	}



	return 0;
}

