#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <unistd.h>
using namespace std;
#define int long long

int x[10000], y[10000];
int allowed[1000002];

int dist(int i, int j) {
    return (x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]);
}

int32_t main() {
    int n;
    cin >> n;
    for (int i=0; i<n; i++) {
        cin >> x[i] >> y[i];
    }
    cout << 1 << " ";
    int akt = 0;
    allowed[0] = 1;
    for (int i=0; i<n-1; i++) {
        pair<int, int> best = {-1, 0};
        for (int j=0; j<n; j++) {
            if (allowed[j] == 1)
                continue;
            best = max(best, {dist(akt, j), j});
        }
        cout << best.second + 1 << " ";
        akt = best.second;
        allowed[akt] = 1;
    }
}