//
// Created by acm on 2021/5/7.
//

#include<bits/stdc++.h>
using namespace std;
#define fo(i,a,b) for(int i=(a);i<=(b);++i)
#define int long long

int a[100004];


struct node{
    int i,j,x,y;
};

vector<node> ans;

signed main(){
    int t;cin>>t;
    while(t--){
        int n;cin>>n;
        ans.clear();
        int minn = 1e10;
        int pos = -1;
        for(int i=1;i<=n;++i){
            scanf("%d",&a[i]);
            if(a[i]<minn) pos = i,minn=a[i];
        }
        int cur = minn+1;
        for(int i=pos+1;i<=n;++i){
            ans.push_back(node{pos,i,minn,cur++});
        }
        cur = minn+1;
        for(int i=pos-1;i>=1;--i){
            ans.push_back(node{pos,i,minn,cur++});
        }
        cout<<ans.size()<<endl;
        for(auto i:ans){
            cout<<i.i<<" "<<i.j<<" "<<i.x<<" "<<i.y<<endl;
        }
    }
}