#include <bits/stdc++.h>
using namespace std;
using lng = long long;
#define vall(v) v.begin(), v.end()

vector <int> solve(vector<int>ots) {
    lng as = 0, bs = 0, n = num.size();
    vector<int>ai, bi;
    vector<pair<int, int>>num(n);
    for (lng i = 0; i < n; i++) {
        num[i] = {ots[i], i};
    }
    sort(vall(num));
    for (lng i = 0; i < n; i++) {
        auto [val, id] = num[i];
        if (bs < as) {
            bs += val;
            bi.push_back(id);
        } else {
            as += val;
            ai.push_back(id);
        }
    }
    if (bs > as) {
        for (auto i : ai) bi.push_back(i);
        return bi;
    } else {
        for (auto i : bi) ai.push_back(i);
        return ai;
    }
}