#include <bits/stdc++.h>
#include "partition.h"
using namespace std;

vector <int> solve(vector <int> a) {
    vector <int> b(a.size(), 0);
    for (int i=0;i<a.size()/2-(a.size()%4)/2;i+=2) {
        b[i]=i;
        b[i+1]=a.size()-i-1;
        b[a.size()-i-2]=a.size()-i-2;
        b[a.size()-i-1]=i+1;
    }
    for (int i=0;i<a.size()%4;i+=1) b[(a.size()-a.size()%4)/2+i]=a.size()-(a.size()-a.size()%4)/2-i-1;
    return b;
}