#include <bits/stdc++.h>
using namespace std;
vector<int> solve(vector<int> A){
    int n = A.size();
    vector<int> first, second;
    for(int i=0; i<n/2; i++){
        if(i%2==0){
            first.push_back(i);
            first.push_back(n-i-1);
        }
        else{
            second.push_back(i);
            second.push_back(n-i-1);
        }
    }
    if(n%2==1){
        first.push_back(n/2);
    }
    vector<int> ans;
    for(auto x : first){
        ans.push_back(x);
    }
    for(auto x : second){
        ans.push_back(x);
    }
    return ans;
}
/*int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t ;
    for (int test=1; test<=t; test++) {
        int n;
        cin >> n ;
        vector <int> a(n);
        for (int i=0; i<n; i++) {
            cin >> a[i] ;
        }

        for (auto ind : solve(a)) {
            cout << ind << " ";
        }
        cout << endl ;
    }
    cout << endl ;
    return 0;
}*/
