#include "bits/stdc++.h"
using namespace std;

#define int long long
#define N 500005

const int inf = INT_MAX;

int a[N], n, ans, S = 0, b[N], c[N];

void solve(int x,int sm,int cnt) {
    if(sm * 2 >= S) {
        int l = cnt;
        int r = n - cnt;
        if(ans > abs(r - l)) {
            ans = abs(r - l);
            for(int i= 1; i <= n; i++) {
                c[i] = b[i];
            }
        }
        return;
    }
    if(x == n) {
        return;
    }
    b[x] = 1;
    solve(x + 1, sm + a[x], cnt + 1);
    b[x] = 0;
    solve(x + 1, sm, cnt);
}

signed main () {
    int tc = 1;
    cin >> tc;
    while(tc--) {
        cin >> n;
        S = 0;
        ans = inf;
        for(int i = 0; i < n; i++) {
            cin >> a[i];
            S += a[i];
            c[i] = i;
        }
        solve(0, 0, 0);
        for(int i = 0; i < n; i++) {
            if(c[i]) cout << i << " ";
        }
        for(int i = 0; i < n; i++) {
            if(!c[i]) cout << i << " ";
        }
        cout << '\n';
    }
}