#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pre(i,a,b) for(int i=a;i>=b;i--)
#define N 5005
#define int long long
using namespace std;
int X[N],Y[N],v[N];
int dis(int x,int y,int u,int v){
	return (x-u)*(x-u)+(y-v)*(y-v);
} 
signed main(){
	int n;scanf("%lld",&n);
	rep(i,1,n)scanf("%lld%lld",&X[i],&Y[i]);
	printf("%d ",1);v[1]=1;int pre=1;
	rep(i,2,n){
		int mx=0,cur=0;
		rep(j,1,n)if(!v[j]&&dis(X[pre],Y[pre],X[j],Y[j])>cur)cur=dis(X[pre],Y[pre],X[j],Y[j]),mx=j;
		printf("%lld ",mx);v[pre=mx]=1;
	}
	return 0;
}