#include<bits/stdc++.h>
using namespace std;

vector<int> solve(vector<int> a){
    int n = a.size(); if(n > 20) return a;
    int s = 0; for(int i = 0; i < n; i++) s += a[i]; s /= 2;
    int p = 1e9, q;
    for(int i = 0; i < (1<<n); i++){
        int r = 0;
        for(int j = 0; j < n; j++){
            if(i&(1<<j)) r += a[j];
        }
        if(abs(s-r) < p) {p = abs(s-r); q = i;}
    }
    vector<int> c;
    for(int i = 0; i < n; i++) if(!(q&(1<<i))) c.push_back(i);
    for(int i = 0; i < n; i++) if(q&(1<<i)) c.push_back(i);
    return c;
}