#include <set>
#include <vector>
#include <iostream>

using namespace std;

unsigned long long dist(pair<long, long> pr1, pair<long, long> pr2) {
    long long a, b;
    a = pr1.first - pr2.first;
    b = pr1.second - pr2.second;
    return (unsigned long long)(a * a) + (unsigned long long)(b * b);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int n;
    cin >> n;
    vector<pair<long, long>> pr, tmp_pr;

    for (int i = 0; i < n; i++) {
        long a, b;
        cin >> a >> b;
        pr.push_back(make_pair(a, b));
    }

    tmp_pr.assign(pr.begin(), pr.end());

    vector<int> perm(n, 0);

    for (int i = 1; i < n; i++) {
        int mx = i;
        for (int j = i + 1; j < n; j++)
            if (dist(pr[mx], pr[i - 1]) < dist(pr[j], pr[i - 1]))
                mx = j;
        pair<long, long> tmp = pr[mx];
        pr[mx] = pr[i];
        pr[i] = tmp;
    }

    for (int i = 1; i < n; i++) {
        int j = 1;
        for (j; j < n; j++)
            if (tmp_pr[j] == pr[i])
                break;
        perm[i] = j;
    }

    for (auto it:perm) cout << it + 1 << " ";
    return 0;
}