#include <bits/stdc++.h>
#define pii pair<int,int>
#define pb push_back
#define ll long long
using namespace std;

const int nmax=100000;


ll v[nmax+1],n;
ll sum;
ll best;
bool taken[nmax+1],best_taken[nmax+1];

void bkt(ll i,ll now_sum,ll cnt){
    if(i==n || now_sum>=(sum+1)/2){
        if(now_sum<(sum+1)/2)
            return;
        ll other=n-cnt;
        ll dif=abs(other-cnt);
        if(dif<best){
            best=dif;
            for(int i=0;i<n;i++)
                best_taken[i]=taken[i];
        }
        return;
    }
    ///take
    taken[i]=1;
    bkt(i+1,now_sum+v[i],cnt+1);
    ///not take
    taken[i]=0;
    bkt(i+1,now_sum,cnt);
}


vector<int> solve(vector<int>A) {
    n=A.size();
    best=100000;
    sum=0;
    for(int i=0;i<n;i++){
        v[i]=A[i];
        sum+=v[i];
    }
    bkt(0,0,0);
    vector<int>answer;
    for(int i=0;i<n;i++)
        if(best_taken[i])
            answer.pb(i);
    for(int i=0;i<n;i++)
        if(!best_taken[i])
            answer.pb(i);
    return answer;
}