#include "partition.h"
#include<iostream>
#include<vector>
#include<algorithm>
#define MAXN 1000000010
using namespace std;
bool used[MAXN];
vector<int> solve(vector<int> a)
{
    int n=a.size();
    long long total=0;
    vector<int> left,right;
    for(int i=0;i<n;i++)
    {
        total+=a[i];
        used[a[i]]=(!used[a[i]]);
        if(used[a[i]]&1)left.push_back(i);
        else right.push_back(i);
    }
    vector<int> ans;
    for(int i=0;i<left.size();i++)ans.push_back(left[i]);
    for(int i=0;i<right.size();i++)ans.push_back(right[i]);
    return ans;
}