#include <bits/stdc++.h>

using namespace std;

vector < int > solve ( vector < int > a ) {
    vector < int > ans;
    if ( a.size () % 2 == 1 ) {
        ans.push_back ( 0 );
        int i , j;
        i = 1;
        j = a.size () - 1;
        while ( i < j ) {
            ans.push_back ( i );
            ans.push_back ( j );
            i++;
            j--;
        }
    } else {
        i = 0;
        j = ans.size () - 1;
        while ( i < j ) {
            ans.push_back ( i );
            ans.push_back ( j );
            i++;
            j--;
        }
    }
    return ans;
}
