#include "partition.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
using namespace std;

const int MAXN=4*1e7;

map<int, int> f;
int n;
int x=0;
int y=0;

vector<int> solve(vector<int> a)
{
    int q=1;
    for(int i=0; i<=25; i++)
    {
        f[q]=i;
        q*=2;
    }
    n=a.size();
    vector<int> ans(n);
    vector<int> ans1;
    int k=n/2;
    for(int i=0; i<n; i++)
    {
        if(f[a[i]]%2==0)
        {
            ans[x]=i;
            x++;
        }
        else
        {
            ans[k+y]=1;
            y++;
        }
    }
    return ans;
}
