#include "partition.h"
#include <bits/stdc++.h>
std::vector<int> solve(std::vector<int> A) {
    int ni=A.size();
    std::vector<int>rezi(ni/2);
    std::vector<int>rezic(ni/2);
    if (ni%4==0){
        for (int i=0;i<ni/2;i++){
            if (i%2==0){
                rezi.push_back(i);
                rezi.push_back(ni-i-1);
            }
            else{
                rezic.push_back(i);
                rezic.push_back(ni-i-1);
            }
        }
    }
    std::vector<int>rezzz;
    for (int i=0;i<ni;i++){
        if (i<rezi.size()) rezzz.push_back(rezi[i]);
        else rezzz.push_back(rezic[i-rezi.size()]);
    }

    return {rezzz};
}