// In the name of Allah.
// We're nothing and you're everything.
// Ya Ali!

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

const int maxn = 5e5 + 7;

int main() {
    ios::sync_with_stdio(0), cin.tie(0);
    int n;
    cin >> n;
    int x[n], y[n];
    for (int i = 0; i < n; ++i) {
        cin >> x[i] >> y[i];
    }
    auto good = [&](int a, int b, int c) {
        return ll(x[c] - x[b]) * (x[a] - x[b]) + ll(y[c] - y[b]) * (y[a] - y[b]) > 0;
    };
    vector<int> ans({0, 1});
    for (int i = 2; i < n; ++i) {
        ans.push_back(i);
        for (int j = i; j >= 2 and !good(ans[j], ans[j - 1], ans[j - 2]); --j) {
            swap(ans[j], ans[j - 1]);
        }
    }
    for (auto x : ans)
        cout << x + 1 << ' ';
    cout << '\n';


}