#include "partition.h"
#include <bits/stdc++.h>
using namespace std;
vector<int>rez,rez1;
std::vector<int> solve(std::vector<int> A)
{
    rez.clear();
    rez1.clear();
    int n=A.size();
    int cnt=n;
    int i1=1,i2=n;
    while(cnt>=4)
    {
        rez.push_back(i1);
        rez.push_back(i2);
        i1++;
        i2--;
        rez1.push_back(i1);
        rez1.push_back(i2);
        i1++;
        i2--;
        cnt-=4;
    }
    if(cnt==1)
        rez.push_back(i1);
    else if(cnt==2)
    {
        rez.push_back(i2);
        rez1.push_back(i1);
    }
    else if(cnt==3)
    {
        rez.push_back(i1);
        rez.push_back(i1+1);
        rez1.push_back(i2);
    }
    for(int i=0;i<rez1.size();i++)
        rez.push_back(rez1[i]);
    return rez;
}
