#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod1 1000000007
#define mod2 1000739749
ll fac(ll a, ll m){
 ll res=1;
 for(int i=1;i<=a;i++){
  res=(1ll*res*(i%m))%m;
 }
return res;}
int main()
{
 ll t;
 cin>>t;
 while(t--){
 ll n;
 cin>>n;
 ll a[n+3];
 for(int i=1;i<=n;i++){
 cin>>a[i];}
 cout<<n-1<<endl;
 for(int i=1;i<n;i++){
   if(i&1){
   cout<<i<<" "<<i+1<<" "<<mod1<<" "<<min(a[i],a[i+1])<<endl;
  a[i+1]=min(a[i],a[i+1]);}
 else{
 cout<<i<<" "<<i+1<<" "<<mod2<<" "<<min(a[i],a[i+1])<<endl;
 a[i+1]=min(a[i],a[i+1]);}
}

}
}

