//#include "infection.h"
//#include <utility>
#include "partition.h"
//#include <pch.h>
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <ios>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <string>

#define FASTIO ios_base::sync_with_stdio(0);cin.tie(NULL);
#define vec vector<int>
#define pii pair<int,int>
#define vecl vector<long long>
#define sz size()
#define endl '\n'
#define pll pair<long,long>
#define ff first
#define ss second
#define pshb push_back
using ll = long long;


using namespace std;

vec solve(vec v) {
	int n = v.sz;
	vector<pii> x(n);
	for (int i = 0; i < n; i++)x[i] = { v[i],i };
	sort(x.begin(), x.end());
	vec ans;
	for (int i = 0; i < (n+1) / 2-1; i++)ans.pshb(x[i].ss);
	ans.pshb(x[n - 1].ss);
	for (int i = (n+1)/2-1 ; i < n-1; i++)ans.pshb(x[i].ss);
	return ans;
}
