#include<bits/stdc++.h>
using namespace std;
#define N 5005
#define For(i,x,y)for(i=x;i<=(y);i++)
#define Down(i,x,y)for(i=x;i>=(y);i--)
struct point
{
	int x,y;
}a[N];
int id[N];
inline bool pd(point p,point q,point k)
{
	return 1LL*(p.x-q.x)*(k.x-q.x)+1LL*(p.y-q.y)*(k.y-q.y)<=0;
}
int main()
{
	int n,i,j;
	scanf("%d",&n);
	For(i,1,n)scanf("%d%d",&a[i].x,&a[i].y),id[i]=i;
	For(i,3,n)
	Down(j,i,3)
	if(pd(a[id[j-2]],a[id[j-1]],a[id[j]]))swap(id[j],id[j-1]);
	For(i,1,n)printf("%d ",id[i]);
	return 0;
}