#include "partition.h"
#include "bits/stdc++.h"

#define pii pair<int, int>
#define pb push_back
#define ar array
#define ll long long

const ll inf = 1e18 + 7;

using namespace std;

vector<int> solve(vector<int> a) {
    int n = a.size();

    vector<int> ret;

    if (n % 2 == 0) {
        for (int i = 0; i < n / 2; i++) {
            ret.pb(i), ret.pb(n - i - 1);
        }
    }
    else {
        for (int i = 0; i < n / 4; i++) {
            ret.pb(i), ret.pb(n - i - 1);
        }

        ret.pb(n / 2);

        for (int i = n / 4; i < n / 2; i++) {
            ret.pb(i), ret.pb(n - i - 1);
        }
    }

    return ret;
}

