#include<bits/stdc++.h>
#define ld long double
#define pb push_back

using namespace std;
int n;

struct Point{
    ld x;
    ld y;
}P[50003];

void input();

ld PointDistance (Point a, Point b){
    ld diff1 = a.x - b.x;
    ld diff2 = a.y - b.y;

    ld k = (diff1*diff1) + (diff2*diff2);

    ld ret = sqrt(k);

    return ret;
}

void solve(){
    vector<bool>mark(n,false);


    vector<int>ans;
    ans.pb(0);
    mark[0]=true;

    while(1){
        if(ans.size()==n)break;
        long double mx = 0.0;
        int idx;
        int last = ans.back();
        for(int j=0;j<n;j++){
            if(mark[j])continue;
            ld d = PointDistance(P[last],P[j]);
            if(mx < d){
                mx = d;
                idx = j;
            }

        }
        ans.pb(idx);
        mark[idx] = true;

    }
    for(int i=0;i<n;i++){
        cout<<ans[i]+1;
        if(i!=n-1)cout<<" ";
    }
    cout<<"\n";
}

void Clear(){

}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);

    input();
    solve();
    Clear();
}

void input(){
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>P[i].x>>P[i].y;
    }
}
