#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define endl "\n"
int main(){
  ios_base::sync_with_stdio(false),cin.tie(NULL);
  ll t;
  cin>>t;
  while(t--){
    ll mod=1e9+7;
    ll n;
    cin>>n;
    ll a[n+1];
    map<ll,ll>mp;
    ll mini=1e12;
    for(ll i=1;i<=n;i++){
        cin>>a[i];
        mini=min(mini,a[i]);
        mp[a[i]]=i;
    }
    if(n==1){
        cout<<"0"<<endl;
    }
    else{
        vector<vector<ll> >ans;
        for(ll i=2;i<=n;i++){
            ll x=a[i];
            ll y=a[i-1];
             ans.push_back({i-1,i,min(x,y),mod});
            i++;

        }
        cout<<ans.size()<<endl;
        for(ll i=0;i<ans.size();i++){
            cout<<ans[i][0]<<" "<<ans[i][1]<<" "<<ans[i][2]<<" "<<ans[i][3]<<endl;
        }
    }
  }
  return 0;
}
