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



#define ios			ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR(i,m)		for(int i = 0 ;i  < m ;i++)
#define mem(a ,b)		memset(a,  (b) , sizeof(a))
#define all(cont)		cont.begin(),cont.end()
#define mp			make_pair
#define pb			push_back
#define F			first
#define S			second
#define cn			cout<<'\n'


typedef pair<int,int>		pi;
typedef	vector<int>		vi;
typedef long long 		ll;
typedef long double		ld;
typedef unsigned long long int  ull;


const int maxN = 1e5 + 1;
const int mod  = 1e9 + 7;




void solve(){

	int n;
	cin >> n;
	int a[n];

	for(int i = 0 ;i <  n;i++) cin >> a[i];

	cout<<n/2<<"\n";
	for(int i = 0 ; i + 1< n; i+=2 ){
		cout<<i+1<<" "<<i+2<<" "<<min(a[i] , a[i+1]) << " "<<mod<<"\n";
	}  



	
}




int main(){	
	


	int T = 1;
	cin >> T;
	
	while(T--){
		solve();
	}

	return 0;
}

