#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ull = unsigned long long;

using ld = long double;

void solve_test(istream &cin, ostream &cout)
{
	int n;
	cin >> n;

	vector<int> x(n), y(n);
	for (int i = 0; i < n; i++)
		cin >> x[i] >> y[i];

	vector<vector<ld>> dist(n, vector<ld>(n));
	for (int i = 0; i < n; i++)
		for (int j = 0; j < n; j++)
		{
			const int dx = x[i] - x[j], dy = y[i] - y[j];
			dist[i][j] = sqrtl((ll)dx * dx + (ll)dy * dy);
		}

	ld best = 1e100;
	vector<int> where;

	vector<int> p(n);
	iota(p.begin(), p.end(), 0);
	do
	{
		ld cur = 0;
		for (int i = 0; i + 1 < n; i++)
			cur += dist[p[i]][p[i + 1]];

		if (best > cur)
		{
			best = cur;
			where = p;
		}
	} while (next_permutation(p.begin(), p.end()));

	for (const int it : where)
		cout << it + 1 << " ";
	cout << endl;
}

void solve(istream &cin = std::cin, ostream &cout = std::cout)
{
	solve_test(cin, cout);
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);

	cout << fixed;

#ifdef LOCAL
	auto st = clock();

	ifstream fin("../input.txt");

	do
	{
		solve(fin);

		cout << "===" << endl;

		string str;
		while (getline(fin, str) && str != string(max(1, (int) str.size()), '='));
	} while (fin);

	cout << setprecision(6) << "clock: " << double(clock() - st) / CLOCKS_PER_SEC << endl;
#else
	solve();
#endif

	return 0;
}
