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

#define int long long

std::vector<int32_t> solve(std::vector<int32_t> A) {
    vector<int32_t> ans;
    int n = A.size();
    for (int i = n - 1; i >= 0; i--) {
        ans.push_back(i);
        if (ans.size() == n) {
            break;
        }
        ans.push_back(n - i - 1);
        if (ans.size() == n) {
            break;
        }
    }
    return ans;
}