#include "partition.h"
#include <algorithm>
using namespace std;

#define MAXN 2000000


vector<int> solve(vector<int> A){
  int n=A.size(),i;
  int x=(n+1)/2;
  long long S=0;
  vector<int> ind(n);

  for(i=0;i<n;i++){
    ind[i]=i;
    S+=A[i];
  }

  vector<int> parts[2];

  for(i=0;i<n/2;i++){
    parts[i%2].push_back(i);
    parts[i%2].push_back(n-i-1);
  }

  if(n%2==1){
    parts[0].push_back((n+1)/2-1);
  }

  for(int pos:parts[1]){
    parts[0].push_back(pos);
  }

  return parts[0];
}