#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll esim = (1 << 30) - 1;
vector<int> solve(vector<int> A) {
    vector<ll> a;
    for (int i = 0; i < (int)A.size(); i++) {
        a.push_back(((ll)A[i] << 30) ^ i);
    }
    //sort(a.begin(), a.end());
    vector<int> ans;
    for (int i = 1; i < (int)a.size(); i += 2) {
        ans.push_back(i);
    }
    if ((int)a.size() % 2 == 1) ans.push_back((int)a.size() - 1);
    for (int i = 0; i < (int)a.size() - 1; i += 2) {
        ans.push_back(i);
    }
    return ans;
}
/*
int main() {
    vector<int> w = { 2, 2, 3, 2, 3, 2, 2, 3 };
    vector<int> q = solve(w);
    for (auto it : q) {
        cout << it << " ";
    }
    cout << "\n";
}
*/