#include <bits/stdc++.h>
using namespace std;
std::vector<int> solve(std::vector<int> A)
{
    vector <int> ans;
    vector < pair<int, int> > p;
    int l = 0, r = A.size()-1;
    while(l < r)
    {
        p.push_back({l, r});
        l++;
        r--;
    }
    int c = p.size()/2;
    if(p.size()%2 == 0)c--;
    int sz = p.size();
    for(int i = 0; i <= c; i++)
    {
       /// cout << i << endl;
        ans.push_back(p[i].second);
        ans.push_back(p[i].first);
    }
    if(A.size()%2)ans.push_back(A.size()/2);
    for(int i =c+1; i < sz; i++)
    {
        ///cout << i << endl;
        ans.push_back(p[i].second);
        ans.push_back(p[i].first);
    }
    return ans;
}
