#include <cstdio>
#include <cstdlib>
#include <algorithm>

using namespace std;

const int MaxN = 5000 + 5;

int N, X[MaxN], Y[MaxN], Perm[MaxN];

int main ( void )
{
    srand ( 1337 );

    scanf ( "%d", &N );

    for ( int i = 0; i < N; i++ )
    {
        scanf ( "%d %d", &X[i], &Y[i] );

        Perm[i] = i;
    }

    if ( N <= 3 )
    {
        for ( int i = 0; i < 3; i++ )
            for ( int j = i + 1; j < 3; j++ ) if ( Y[Perm[i]] > Y[Perm[j]] ) swap ( Perm[i], Perm[j] );

        printf ( "%d\n%d\n%d\n", Perm[0] + 1, Perm[2] + 1, Perm[1] + 1 );

        return 0;
    }

    int IterCount = 100000000 / N / N;

    bool Found = false;

    for ( int iter = 0; iter < IterCount; iter++ )
    {
        random_shuffle ( Perm, Perm + N );

        bool Ok = true;

        for ( int i = 1; i < N; i++ )
        {
            if ( i % 2 )
            {
                if ( Y[Perm[i - 1]] >= Y[Perm[i]] )
                {
                    Ok = false;

                    break;
                }
            }
            else
            {
                if ( Y[Perm[i - 1]] <= Y[Perm[i]] )
                {
                    Ok = false;

                    break;
                }
            }
        }

        int NextFirst = 0;

        for ( int i = 0; i < N; i++ )
        {
            NextFirst++;

            if ( NextFirst >= N ) NextFirst -= N;

            int X1 = X[Perm[i]], Y1 = Y[Perm[i]], X2 = X[Perm[NextFirst]], Y2 = Y[Perm[NextFirst]];

            int j = NextFirst + 1, NextSecond = j + 1;

            while ( NextSecond != i )
            {
                //printf ( "%d %d %d %d\n", i, NextFirst, j, NextSecond );

                int X3 = X[Perm[j]], Y3 = Y[Perm[j]], X4 = X[Perm[NextSecond]], Y4 = Y[Perm[NextSecond]];

                double Det = ( X1 - X2 ) * ( Y3 - Y4 ) - ( X3 - X4 ) * ( Y1 - Y2 );

                if ( ! Det )
                {
                    j = NextSecond;

                    NextSecond++;
                    if ( NextSecond >= N ) NextSecond -= N;

                    continue;
                }

                double D1 = X1 * Y2 - X2 * Y1;
                double D2 = X3 * Y4 - X4 * Y3;

                double __X0 = D1 * ( X3 - X4 ) - D2 * ( X1 - X2 );
                double __Y0 = D1 * ( Y3 - Y4 ) - D2 * ( Y1 - Y2 );

                double X0 = __X0 / Det;
                double Y0 = __Y0 / Det;

                if ( ( min ( X1, X2 ) <= X0 ) && ( max ( X1, X2 ) <= X0 ) && ( min ( Y1, Y2 ) <= Y0 ) && ( Y0 <= max ( Y1, Y2 ) ) )
                {
                    Ok = false;

                    break;
                }

                if ( ( min ( X3, X4 ) <= X0 ) && ( max ( X3, X4 ) <= X0 ) && ( min ( Y3, Y4 ) <= Y0 ) && ( Y0 <= max ( Y3, Y4 ) ) )
                {
                    Ok = false;

                    break;
                }

                j = NextSecond;

                NextSecond++;
                if ( NextSecond >= N ) NextSecond -= N;
            }

            if ( ! Ok ) break;
        }

        if ( Ok )
        {
            Found = true;

            break;
        }
    }

    if ( Found ) for ( int i = 0; i < N; i++ ) printf ( "%d\n", Perm[i] + 1 );
    else printf ( "-1\n" );

    return 0;
}
