#include<iostream>
#include<vector>
using namespace std;
vector <int> solve(vector <int> A){
    const int MAXN = 2000005;
    int N = A.size();
    vector <int> ans;
    vector <int> arr;
    for(int i = 0; i < MAXN; i ++){
        arr.push_back(0);
    }
    if(N % 4 == 0){
        for(int i = 0; i < N/2; i ++){
            ans.push_back(i);
            ans.push_back(N - 1 - i);
        }
        return ans;
    }
    if(N % 4 == 2){
        int index = 0;
        while(index < (N - 2)/2){
            arr[index] = N - 1 - index;
            arr[index + 1] = index;
            arr[N - 1 - index] = index + 1;
            arr[N - 2 - index] = N - 2 - index;
            index += 2;
        }
        arr[(N - 1)/2] = (N - 1)/2 + 1;
        arr[(N - 1)/2 + 1] = (N - 1)/2;
        for(int i = 0; i < N; i ++){
            ans.push_back(arr[i]);
        }
        return ans;

    }
    if(N % 4 == 1){

    }
    return ans;
}
