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

using namespace std;

using ll = long long;

#define ff  first
#define ss  second
#define pii pair<int, int>

#define sz(a)  (int)(a).size()
#define all(a) (a).begin(), (a).end()

vector<int> solve(vector<int> a) {
    // cout << 10 * 2e6 * log2(2e6) / 1e8 << endl;

    int n = sz(a);
    
    // pii p[n];
    // for (int i = 0; i < n; i++) {
    //     p[i] = {a[i], i};
    // }
    // sort(p, p + n);

    vector<int> ans;
    for (int i = (n - 1) & 1; i < n; i += 2) {
        ans.push_back(p[i].ss);
    }
    for (int i = !((n - 1) & 1); i < n; i += 2) {
        ans.push_back(p[i].ss);
    }

    return ans;
}