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

struct pt{
	long long x, y;
};

const int maxn = 5005;
int n;
pt p[maxn];
bool used[maxn];
int ans[maxn];
pt cur;

long long dist(pt a, pt b){
	return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y);
}

int main(){
	cin >> n;
	for (int i=0; i<n; i++) cin >> p[i].x >> p[i].y;
	memset(used,0,sizeof used);
	used[0] = 1;
	cur = p[0];
	ans[0] = 1;
	for (int i=1; i<n; i++){
		long long max_dist = 0; int idx;
		for (int j=0; j<n; j++){
			if (used[j]) continue;
			if (dist(cur,p[j]) > max_dist){
				max_dist = dist(cur,p[j]);
				idx = j;
			}
		}
		ans[i] = idx+1;
		used[idx] = 1;
		cur = p[idx];
	}
	for (int i=0; i<n; i++) cout << ans[i] << " ";
	cout << "\n";
}