#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=5005;

struct Point{
	int x,y;
	int pos;
}p[N];

ll check(ll x1,ll y1,ll x2,ll y2){
	ll res;
	res=x1*x2+y1*y2;
	return res;
}

int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>p[i].x>>p[i].y;
		p[i].pos=i;
	}
	for(int i=3;i<=n;i++)
		for(int j=i;j>2;j--)
			if(check(p[j].x-p[j-1].x,p[j].y-p[j-1].y,p[j-2].x-p[j-1].x,p[j-2].y-p[j-1].y)<=0)	swap(p[j],p[j-1]);
			else									break;
	for(int i=1;i<=n;i++){
		if(i!=1)	cout<<" ";
		cout<<p[i].pos;
	}
	cout<<endl;
	return 0;
}
	  	 	 		 			 			   		  	 	 		