#include <iostream>
#include <vector>	
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#define pii pair<int,int>
#define ll long long
using namespace std;
vector<bool>ans;
int mx = 1e9;
void rec(vector<bool>used, int n, vector<int>a,int sm) {
	int sm1 = 0;
	for (int i = 0; i < n; i++) {
		if (used[i]) {
			sm1 += a[i];
		}
	}
	if (sm1 > sm and sm1 < mx) {
		mx = sm1;
		ans = used;
	}
}
vector<int>solve(vector<int>A) {
	int sm = 0;
	for (int i = 0; i < A.size(); i++) {
		sm += A[i];
	}
	vector<bool>used(A.size(), false);
	rec(used, A.size(), A, sm);
	vector<int>ans;
	for (int i = 0; i < A.size(); i++) {
		if (used[i]) {
			ans.push_back(i);
		}
	}
	for (int i = 0; i < A.size(); i++) {
		if (!used[i]) {
			ans.push_back(i);
		}
	}
}
