#include <bits/stdc++.h>
using namespace std;
int mn=1e9;

void recursion(vector<int> v, int idx, vector<bool> used, int n, vector<int>& A, int& target, vector<int>& res) {
    if (idx==n) {
        int sum=0,cnt=0,N=A.size();
        for (int x:v) {
            sum+=A[x];
            cnt++;
            if (sum>=target) {
                break;
            }
        }
        if (abs(cnt-(N-cnt))<mn) {
            mn=abs(cnt-(N-cnt));
            res=v;
        }
        return;
    }
    for (int i=0; i<n; i++) {
        if (!used[i]) {
            used[i]=true;
            v.push_back(i);
            recursion(v,idx+1,used,n,A,target,res);
            used[i]=false;
            v.pop_back();
        }
    }
}

vector<int> solve(vector<int> A) {
    vector<int> res;
    mn=1e9;
    int sum=0,n=A.size();
    for (int i=0; i<n; i++) sum+=A[i];
    int t=sum/2+sum%2;
    vector<bool> used(n,false);
    vector<int> v;
    recursion(v,0,used,n,A,t,res);
    return res;
}

int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t ;
    for (int test=1; test<=t; test++) {
        int n;
        cin >> n ;
        vector <int> a(n);
        for (int i=0; i<n; i++) {
            cin >> a[i] ;
        }

        for (auto ind : solve(a)) {
            cout << ind << " ";
        }
        cout << endl ;
    }
    cout << endl ;
    return 0;
}