#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <ctime>

using namespace std;

const int MAX_N = 5005;

int n;
int x[MAX_N];
int y[MAX_N];
int mark[MAX_N];
int path[MAX_N];

int sta;

long long calc(int i, int j, int k) {
    long long A = y[i] - y[j];
    long long B = x[j] - x[i];
    long long C = A * ((long long)x[i]) + B * ((long long)y[i]);
    return A * ((long long)x[k]) + B * ((long long)y[k]) - C;
}

bool check(int cnt, int at) {
    for (int i = 0; i < cnt - 2; ++i) {
        if (calc(path[i], path[i + 1], at) * calc(path[i], path[i + 1], path[cnt - 1]) < 0 &&
            calc(path[cnt - 1], at, path[i]) * calc(path[cnt - 1], at, path[i + 1]) < 0)
            return false;
    }
    return true;
}

bool go(int cur) {
    if (cur == n)
        return true;
    for (int i = 0; i < n; ++i) {
        if ((clock() - sta) / double(CLOCKS_PER_SEC) > 0.7) return false;
        if (!mark[i]) {
            if (check(cur, i)) {
                path[cur] = i;
                mark[i] = true;
                if (go(cur + 1)) return true;
            }
        }
    }
    return false;
}

int main() {
    freopen("flojd.in", "r", stdin);
    freopen("flojd.out", "w", stdout);
    srand(10019212123LL);
    sta = clock();
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
        scanf("%d%d", &x[i], &y[i]);
    for (int i = 0; i < n; ++i) {
        int t = rand() % (i + 1);
        swap(x[t], x[i]);
        swap(y[t], y[i]);
    }
    memset(mark, 0, sizeof(mark));
    if (go(0)) {
        for (int i = 0; i < n; ++i)
            printf("%d\n", path[i] + 1);
    } else printf("-1\n");
    return 0;
}
