#include "partition.h"
#include <algorithm>
#include <cmath>
#include <vector>
#include <cassert>

using namespace std;
const int N = 2e6 + 67;
typedef long long ll;

#define all(X) (X).begin(), (X).end()
#define ff first
#define ss second

bool used[N];
pair<int, int>a[N];

std::vector<int> solve(std::vector<int> A) 
{
	int n = A.size();
	ll S = 0;
	for (int i = 0; i < n; i++) {
		S += 1ll * A[i];
	}
	vector<int>answ;
	int l = 0, r = n - 1;
	int id = 0;
	while (l <= r)
	{
		if (id & 1)
		{
			answ.push_back(r);
			r--;
		}
		else
		{
			answ.push_back(l);
			l++;
		}
		id++;
	}
	return answ;
}
