#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "dbg.h"
#else
#define dbg(...) {/* AAAAAAAA; */}
#endif

using ll = long long;
using pii = pair<int,int>;

void solve()
{
	int n;
	cin >> n;
	vector<int> v(n);
	for(auto &e:v) cin >> e;
	int primes[] = {(int)1e9+7, (int)1e9+9};
	cout << n-1 << "\n";
	int mni = min_element(v.begin(), v.end()) - v.begin();
	for(int i=0;i<n;++i){
		if(i == mni)
			continue;
		cout << i+1 << " " << mni + 1 << " " << primes[i%2] << " " << v[mni] << "\n";
		v[i] = primes[i%2];
	}

	for(int i=1;i<n;++i)
		dbg(__gcd(v[i], v[i-1]));
}

int main()
{
	int tc;
	scanf("%d", &tc);
	while(tc--){
		solve();
	}
}
