#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define vi vector<int>
#define vb vector<bool>
#define pii pair<int,int>
#define mod 1000000007
#define ss second
#define si(c)  (int)((c).size())
#define ff first
#define vpii vector<pii>
#define vvpii vector<vpii>
#define vvi vector<vi>
#define pb push_back
#define vs vector<string>
#define all(x) x.begin(),x.end()
#define mii map<int,int>
#define vd vector<double>
#define deb(x) cout<<#x<<" -> "<<x<<endl
const int inf=0x3f3f3f3f3f3f3f3f;
#define MAXN 1000000007
const int MOD = (int)1e9 + 7;
const int M = 1141919810;
#define INT_SIZE 32


int32_t main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    int t=1;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        vi v(n,0);
        for(int i=0;i<n;i++){
            cin>>v[i];
        }
        if(n&1) n--;
        cout<<n/2<<endl;
        for(int i=0;i<n;i+=2){
            int x=min(v[i],v[i+1]);
            cout<<i+1<<" "<<i+2<<" "<<x<<" "<<mod<<endl;
        }
    }
}
    	