#include<bits/stdc++.h>
#include "partition.h"
using namespace std;
const int MAXN=1e7;
int idx[MAXN+1];
vector<int> solve(vector<int> A) {
    int n=A.size();
    for(int i=0; i<A.size(); i++) {
        idx[A[i]]=i;
    }
    vector<int>res;
    for(int i=1;i<=n;i+=2){
       res.push_back(idx[i]);
    }
    for(int i=2;i<=n;i+=2){
        res.push_back(idx[i]);
    }
    return res;
}
/*
int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t ;
    for (int test=1; test<=t; test++) {
        int n;
        cin >> n ;
        vector <int> a(n);
        for (int i=0; i<n; i++) {
            cin >> a[i] ;
        }

        for (auto ind : solve(a)) {
            cout << ind << " ";
        }
        cout << endl ;
    }
    cout << endl ;
    return 0;
}
*/
