#include <bits/stdc++.h>

using namespace std;

const long long inf = 1e18;

vector<int> solve(vector<int> a) {
    int n = a.size();
    long long sum = 0;
    for (int i = 0; i < n; i++)
        sum += a[i];

    vector<int> ans;
    long long d = inf;

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

        if (s >= sum / 2.0)
            continue;

        if (abs(2 * cnt - n) < d) {
            d = abs(2 * cnt - n);
            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;
}