#include <bits/stdc++.h>

using namespace std;

const long long inf = 1e18;

vector<int> solve(vector<int> a) {
    int n = a.size();

    int best = n;
    vector<int> ans;

    long long s = 0;
    for (int &val : a)
        s += val;

    for (int mask = 1; mask < (1 << n); mask++) {
        long long sum = 0;
        int cnt = 0;

        for (int i = 0; i < n; i++) {
            if (mask & (1 << i)) {
                sum += a[i];
                cnt++;
            }
        }

        if (sum >= s / 2.0)
            break;

        int d = abs(2 * cnt - n);
        if (best > d) {
            best = d;
            ans.clear();

            for (int i = 0; i < n; i++) {
                if (mask & (1 << i))
                    ans.push_back(i);
            }

            for (int i = 0; i < n; i++) {
                if (!(mask & (1 << i)))
                    ans.push_back(i);
            }
        }
    }
    return ans;
}