#include <bits/stdc++.h>

using namespace std;

typedef long long lint;
typedef pair<int, int> pi;

const int dy[4] = { -1, 1, 0, 0 }, dx[4] = { 0, 0, -1, 1 };

lint x[5001], y[5001];
bool chk[5001];

long long dist(int i, int j) {
	return (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]);
}

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

	int n;
	cin >> n;
	for (int i = 1; i <= n; ++i)
		cin >> x[i] >> y[i];
	
	vector<int> ans;
	ans.push_back(1);
	int now = 1;
	chk[1] = true;
	bool flag = true;
	for (int i = 1; i < n; ++i) {
		long long mx = 0;
		int mxi = 0;
		for (int j = 1; j <= n; ++j)
			if (!chk[j] && mx < dist(now, j)) {
				mx = dist(now, j);
				mxi = j;
			}

		ans.push_back(mxi);
		now = mxi;
		chk[mxi] = true;
		
		if (ans.size() >= 3) {
			int e = ans.size() - 3;
			if (dist(ans[e], ans[e + 1]) + dist(ans[e + 1], ans[e + 2]) == dist(ans[e], ans[e + 2])) {
				flag = false;
			}
		}
	}

	if (flag)
		for (int x : ans)
			cout << x << " ";
	else
		cout << 1;

	return 0;
}