#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

std::vector<int> solve(std::vector <int> a){
    vector <int> perm;
    ll so = 10e12, n = a.size();
    ll sum = 0;
    for (int i = 0; i < n; i++)
        sum += a[i];
    if(n <= 20){
       for (int i = 1; i < (1<<n); i++){
        ll f = 0, s = 0;
        vector <ll> p;
        vector <ll> p1;
        for (int j = 0; j < n; j++){
            if((i&(1<<j)) == (1<<j)){
                f += a[j];
                p.push_back(j);
            }
            else{ p1.push_back(j);}
        }
         if(f*2 >= sum && f < so){
            so = f;
            vector <int> now;
            for (auto u : p){ now.push_back(u); /*cout << u << " ";*/}
           // cout << endl;
            for (auto u : p1) now.push_back(u);
            perm = now;
         }
       }
    }
   // cout << so << endl;
    return perm;
}