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

#define MAXN 2000000

vector<int> sol;
bool found;
int n;
void bkt(int k,long long sum){
  if(found){
    return;
  }

  if(k==(n+1)/2){
    if(sum>=(1LL<<(n-1))){

      for(int i=0;i<n;i++){
        if(!(sum&(1<<i))){
          sol.push_back(i);
        }
      }

      found=true;
      return;
    }
  }else{
    for(int i=0;i<n;i++){
      if(!(sum&(1<<i))){
        sol.push_back(i);
        bkt(k+1,sum+(1<<i));
        if(found){
          return;
        }
        sol.pop_back();
      }
    }
  }
}

vector<int> solve(vector<int> A){
  n=A.size();
  int i;

  // sol.clear();
  // found=false;
  // bkt(0,0LL);

  sol.clear();
  for(i=0;i<(n+1)/2-1;i++){
    sol.push_back(i);
  }
  sol.push_back(n-1);
  for(i=(n+1)/2-1;i<n-1;i++){
    sol.push_back(i);
  }

  return sol;
}