#include "partition.h"
#include <bits/stdc++.h>

using namespace std;
const int N = 3e7+2;
int cnt[N];

std::vector<int> solve(std::vector<int> A) {
    int n = (int)A.size();
    int l = 0, r = n-1;
    vector<int> c, s;
    int turn = 1;
    while (l <= r) {
		if (l == r) {
			c.push_back(l);
			break;
		}
		if (turn) {c.push_back(l),
			c.push_back(r);
		} else  {
			s.push_back(l),
			s.push_back(r);
		}
		turn = 1-turn;
		l += 1, r--;
	}
	vector<int> res = c;
	for (auto i: s)res.push_back(i);
	return res;
}
