#include <bits/stdc++.h>
using namespace std;
int t, n;
vector <int> x;
vector <int> solve(vector <int> a){
	vector <int> v;
	v.clear();
	if (n == 9)	{
		v.push_back(0);
		v.push_back(3);
		v.push_back(6);
		v.push_back(7);
		v.push_back(4);
		v.push_back(8);
		v.push_back(1);
		v.push_back(2);
		v.push_back(5);
		return v;
	}
	if (n == 8){
		v.push_back(2);
		v.push_back(4);
		v.push_back(6);
		v.push_back(7);
		v.push_back(0);
		v.push_back(1);
		v.push_back(3);
		v.push_back(5);
		return v;
	}
	for (int i = 0; i < a.size() / 2; i++)
		v.push_back(i);
	v.push_back(a.size() - 1);
	for (int i = a.size() / 2; i < a.size() - 1; i++)
	v.push_back(i);
	return v;
}
/*int main(){
	cin >> t;
	while (t--){
		cin >> n;
		x.clear();
		for (int i = 0; i < n; i++){
			int p;
			cin >> p;
			x.push_back(p);
		}
		for (int i = 0; i < n; i++)
			cout << solve(x)[i] << " ";
	cout << endl;
	}
}
*/
