#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
void speed()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int t,n,a[2000005];
vector<int>otg1,otg2;
void read()
{
    cin>>t;
    for(int z=1;z<=t;z++)
    {
        cin>>n;
        long long int sum=0;
        for(int i=1;i<=n;i++)
        {
            cin>>a[i];
            sum+=a[i];
        }
        sort(a+1,a+n+1);
        long long int st1=0,st2=0;
        for(int i=n;i>=0;i--)
        {
            if(st1<=st2)
            {
                st1+=a[i];
                otg1.push_back(i);
            }
            else
            {
                st2+=a[i];
                otg2.push_back(i);
            }
            //cout<<st1<<" "<<st2<<endl;
        }
        for(int i=0;i<otg1.size();i++)
        {
            cout<<otg1[i]<<" ";
        }
        for(int i=0;i<otg2.size();i++)
        {
            cout<<otg2[i]<<" ";
        }
        cout<<endl;
    }
}
int main()
{
    speed();
    read();
    return 0;
}
