#include <iostream>
#include <vector>
using namespace std;

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

    pair<int, int> best = {2000000000, -1};
    for(int i = 0; i<(1<<(n+1)); i++){
        int s = 0;
        for(int j = 0; j<=n+1; j++){
            if((1<<j)&i) s += A[j];
        }
        if((s>=sum) && (s - sum < best.first)) best = {s-sum, i};
    }

    vector<int> ans;
    for(int i = 0; i<n; i++) if(best.first&(1<<i)) ans.push_back(i);
    for(int i = 0; i<n; i++) if(!(best.first&(1<<i))) ans.push_back(i);

    return ans;
}