#include <iostream>
#include <algorithm>
#include <string.h>
#include <cmath>
#include <queue>
#include <vector>
#include <stack>
#include <map>
#include <unordered_map>
using namespace std;
#define rep(i,a,n) for(int i=a;i<=n;i++)
#define per(i,n,a) for(int i=n;i>=a;i--)
#define pb push_back
typedef long long ll;
const int N = 1e6 + 5;
const int mod = 998244353;

ll gcd(ll a,ll b)
{
    if(!b) return a;
    return gcd(b,a%b);
}
ll quick(ll a, ll b) {
    ll ans = 1;
    while(b) {
        if(b & 1) ans = ans * a %mod;
        a = a * a %mod;
        b >>= 1;
    }
    return ans;
}

struct P {
    ll x,y,id;
    ll operator * (const P &a) const {
        return a.x * x + a.y * y;
    }
    P operator - (const P &a) const {
        return {x-a.x,y-a.y};
    }
}a[N];

int main() {
    int t,n,Q,x,y;
    scanf("%d",&n);
    rep(i,1,n) scanf("%lld%lld",&a[i].x,&a[i].y),a[i].id = i;
    rep(i,3,n) {
        per(j,i,3) {
            if((a[j]-a[j-1])*(a[j-2]-a[j-1])<=0) swap(a[j-1],a[j-2]);
        }
    }
    rep(i,1,n) printf("%lld ",a[i].id);
    puts("");
    return 0;
}