#ifndef _MY
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,abm,mmx,tune=native")
#endif
#include "bits/stdc++.h"
#define int ll
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef long double ld;
const int64_t INF = (int64_t)(2e18);
const int inf = (int)(1e9 + 7);
const int maxn = 500 * 1000 + 100;
chrono::time_point<chrono::steady_clock> cl;
double current_time() { return (double)(chrono::steady_clock::now() - cl).count() / 1e9; }
//------------------------------------------//




int32_t main(){
    cl = chrono::steady_clock::now();
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    cin.tie(nullptr);
#ifdef _MY
    freopen("VimProject/input.txt", "r", stdin);
    freopen("VimProject/output.txt", "w", stdout);
#endif

    int n;
    cin >> n;
    vector<pair<int,int>> vp(n);
    for (auto& it : vp) cin >> it.first >> it.second;
    vector<int> used(n, 0);
    vector<int> res(1, 0);
    used[0] = 1;
    while(res.size() < n){
        int d = 0;
        int ind = -1;
        for (int i = 0; i < n; ++i){
            if (used[i]) continue;
            int curd = 0;
            curd += (vp[res.back()].first-vp[i].first)*(vp[res.back()].first-vp[i].first);
            curd += (vp[res.back()].second-vp[i].second)*(vp[res.back()].second-vp[i].second);
            if (curd < d) continue;
            d = curd;
            ind = i;
        }
        used[ind] = 1;
        res.push_back(ind);
    }
    for (auto& it : res) cout << it +1 << " ";

    return 0;
}
