#include "partition.h"
using namespace std;

vector<int> solve(vector<int> A) {
    vector<int> ans(A.size());
    int i1 = 0, i2 = A.size() / 2;
    bool isi2 = true;
    ans[i2++] = A[0];
    for (int i = 1; i < A.size(); i++) {
        if (isi2)
            ans[i2++] = i;
        else
            ans[i1++] = i;
        isi2 = !isi2;
    }
    return ans;
}
