#include<bits/stdc++.h>

#define ll long long
#define sc(n) scanf("%d", &n)
#define scl(n) scanf("%lld", &n)
#define pr(n) printf("%d\n", n)
#define prl(n) printf("%lld\n", n)
#define fast ios_base::sync_with_stdio(0)
//using namespace std::chrono;
#define start auto st = high_resolution_clock::now()
#define stop auto sp = high_resolution_clock::now()
#define duration auto duration = duration_cast<microseconds>(sp-st); cout << endl << duration.count() << endl
#define frei freopen("input.txt", "r", stdin)
#define freo freopen("output.txt", "w", stdout)
#define fast ios_base::sync_with_stdio(0)

using namespace std;

const int M = 1000000009;

int main()
{
  int t;
  sc(t);

  while(t--)
  {
    int n;
    sc(n);
    ll array[n+9];
    for (size_t i = 1; i <= n; i++) scl(array[i]);

    ll output[n+9][4];
    int count = 0, k = 1;

    for (size_t i = 2; i <= n; i++) {

      if(i%2 == 0) {
        array[i] = min(array[i], array[i-1]);
        array[i-1] = M;

        output[k][0] = i-1; output[k][1] = i;
        output[k][2] = array[i-1]; output[k][3] = array[i];

        k++;
        count++;
      }

      else {
        array[i-1] = min(array[i], array[i-1]);
        array[i] = M;
        output[k][0] = i-1; output[k][1] = i;
        output[k][2] = array[i-1]; output[k][3] = array[i];
        k++;
        count++;
      }

    }


    pr(count);
    for (size_t i = 1; i <= count; i++) {
      printf("%lld %lld %lld %lld\n", output[i][0], output[i][1], output[i][2], output[i][3]);
    }

  }

}
