#include <bits/stdc++.h>
#define ss second
#define ff first
#define en end
#define be begin
#define ve vector
#define pb push_back
#define ppb pop_back

using namespace std;
ve<int> solve(ve<int>a){
    ve<pair<long long ,long long >>v;
    long long  n=a.size();
    ve<pair<long long ,long long >>c,d;
    long long  sm=0;
    for (long long  i=0; i<n; i++){
        v.pb({a[i],i});
        sm+=a[i];
    }
    sm/=2;
    sort(v.be(),v.en());
    for (long long  i=0; i<n; i++){
        if (i%2==0) c.pb({v[i].ff,v[i].ss});
        else d.pb(v[i]);
    }
    long long  q=0;
    for (long long  i=0; i<c.size(); i++){
        q+=c[i].ff;
    }
    ve<int>e;
    if (q<sm){
        for (auto g:d)
            e.pb(g.ss);
        for (auto g:c)
            e.pb(g.ss);

    }
    else {
        for (auto g:c)
            e.pb(g.ss);
        for (auto g:d)
            e.pb(g.ss);
    }
    return e;
}