// Codeforces Round #720 (Div. 2)
// Problem link: https://codeforces.com/problemset/problem/1521/B
// Problem tags:         constructive algorithms    math    *1300

 
 
// CODE

#include <iostream>
#include <vector>
#include <limits.h>

using namespace std;

int main() 
{
   int t;
   cin >> t;
   while(t--)
   {
        int n;
        cin >> n;
       
        vector<int> arr(n+1);
        int min = INT_MAX, pos = -1; 
        for(int i = 1; i <= n; i++)
        {
            cin >> arr[i];
            if(arr[i] < min)
            {
               min = arr[i];
               pos = i;
            }
        }
       
        cout << n-1 << "\n";
       
        int next = min+1;
        for(int i = pos-1; i > 0; i--)
        {
            arr[i] = next;
            cout << pos << " " << i << " " << min << " " << next << "\n"; 
            next++;
        }
        next = min+1;
        for(int i = pos+1; i <= n; i++)
        {
            arr[i] = next;
            cout << pos << " " << i << " " << min << " " << next << "\n"; 
            next++;
        }
       
        // cout << "array: ";
        // for(int i=1; i<=n; i++)
        //     cout << arr[i] << " ";
        // cout << "\n";
   }
   
   return 0;
}
 
 