#include <bits/stdc++.h>
#inlude "partition.h"

using namespace std;

#define ff first
#define ss second
#define all(a) a.begin(),a.end()
#define pb push_back


vector<int> solve(vector<int> a) {
    int n = a.size();
    vector <pair<int,int> > b(n);

    for(int i = 0;i < n;i++){
        cin >> a[i];
        b[i].ff = a[i];
        b[i].ss = i;
    }

    sort(all(b));

    vector <int> ans;

    for(int i = 0;i < n;i += 2){
        ans.pb(b[i].ss);
    }
    for(int i = 1;i < n;i += 2){
        ans.pb(b[i].ss);
    }

    return ans;
}
