#include <bits/stdc++.h>
using namespace std;
vector <int> ans;
std::vector<int> solve(std::vector<int> A)
{
    ans.clear();
    int N = A.size(), ci;
    for (int i = 0; i < N; i++)
    {
        if (A[i] == (1<<(N-1))) ci = i;
    }
    ans.push_back(ci);
    for (int i = 0; i < N; i++)
    {
        if (i != ci) ans.push_back(i);
    }
    return ans;
}