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

typedef long long ll;

const int N = 1e5 + 1000;

int a[N];

int main() {
	int t;
	scanf("%d",&t);
	while (t--) {
		int n;
		scanf("%d",&n);
		for (int i=1; i<=n; ++i) {
			scanf("%lld",&a[i]);
		}
		
		int ind = -1, mmin = 0x7fffffff;
		for (int i=1; i<=n; ++i) {
			if (a[i] < mmin) mmin = a[ind = i];
		}
		
		int l = ind - 1, r = ind + 1;
		
		printf("%d\n",n-1);
		
		int t1 = a[ind];
		while (0 < l) {
			++t1;
			printf("%d %d %d %d\n",ind,l,a[ind],t1);
			--l;
		}
		
		int t2 = a[ind];
		while (r <= n) {
			++t2;
			printf("%d %d %d %d\n",ind,r,a[ind],t2);
			++r;
		}
	}
}