/** Fucc :/
 - doanphuc : /
	** author: doanphuc. **
**/
#include <bits/stdc++.h>
#define TASK ""
#define inpf freopen(TASK".inp", "r", stdin)
#define outf freopen(TASK".out", "w", stdout)
#define FOR(i,x,y) for(int i = x; i <= y ; i ++)
#define FORT(i,x,y) for(int i = x; i < y ; i ++)
#define FORD(i,x,y) for(int i = x; i >= y ; i --)
#define clean(x) memset(x, 0, sizeof(x))
#define F first
#define S second
#define maxn 250001
#define MOD 1000000007
#define pii pair<ll,ll>
#define ll long long int
#define db double
#define pb push_back
#define yes cout << "YES" << "\n"
#define no  cout << "NO" << "\n"
#define bit(p,x) ((x>>p) & 1)
#define all(x) (x).begin(), (x).end()
#define resized(x) (x).resize(unique(all(x)) - (x).begin())
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
int t, n, m, k, a[maxn] ;
void act()
{
    cin >> n ;
    FOR(i, 1, n) cin >> a[i] ;
    cout << n / 2 << endl ;
    for(int i = 1; i <= n - 1; i += 2)
    {
        cout << i << ' ' << i + 1 << ' ' ;
        cout << min(a[i], a[i + 1]) << ' ' << MOD << endl ;
    }
}
int main()
{
   // inpf; outf; fast;
    cin >> t;
    while(t --) act() ;
}
