#include "partition.h"
#include <bits/stdc++.h>
#define endl "\n"

using namespace std;

std::vector<int> solve(std::vector<int> A)
{
    int n = A.size();
    vector<int>ans;
    int p1 = 0, p2 = n-1;
    for(int i = 1; i <= n; i++)
    {
        if(i%2)
        {
            ans.push_back(p1);
            p1++;
        }
        else
        {
            ans.push_back(p2);
            p2--;
        }
    }
    return ans;
}
