#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>
std::vector<int> solve(std::vector<int> A){
    int ch=1;
    for(int i=1;i<A.size();i++){
        ch*=2;
    }
    int index=0;
    for(int i=0;i<A.size();i++){
        if(A[i]==ch)index=i;
    }
    std::vector<int>B;
    B.push_back(index);
    for(int i=0;i<A.size();i++){
        if(i!=index){
            B.push_back(i);
        }
    }
    return B;
}