#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,popcnt")
#define ll long long
std::vector<int> solve(std::vector<int> A)
{
    vector<int> st, dr;
    int last = 0;
    if(A.size() == 2)
    {
        st.push_back(1);
        st.push_back(0);
        return st;
    }
    for(int i = 0; i < A.size() / 2; i++)
    {
        if(i % 2 == 0)
        {
            st.push_back(A.size() - i - 1);
            st.push_back(i);
            last = 1;
        }
        else
        {
            dr.push_back(A.size() - i - 1);
            dr.push_back(i);
            last = 0;
        }
    }
    if(last && A.size() % 2)
        dr.push_back(A.size() / 2);
    if(!last && A.size() % 2)
        st.push_back(A.size() / 2);
    for(auto it : dr)
        st.push_back(it);
    return st;
}
