#include "partition.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 12, INF = 1e18 + 7;
vector<int> solve(vector<int> A) {
	vector<int>res;
	int ok = (int)A.size() / 2;
	if((int)A.size() % 2 != 0){
		ok += 1;
	}
	vector<pair<int, int>>hh;
	for(int i = 0; i < (int)A.size(); ++i){
		hh.push_back({A[i], i});
	}
	sort(hh.begin(), hh.end());
	for(int i = 0; i < (int)A.size() - 1; ++i){
		if(i + 1 == ok){
			res.push_back(hh.back().second);
		} else {
			res.push_back(hh[i].second);
		}
	}
	return res;
}
