#include <cstdlib>
#include <iostream>
#include <stdio.h>
#define MAXN 5000

using namespace std;

int n,dummy1,dummy2;
int main(int argc, char *argv[])
{
            //APP pristup
            //Garant ne postoji nikad slucaj kad je -1 ....
            freopen("flojd.in","r",stdin);
            freopen("flojd.out","w",stdout); 
            scanf("%d",&n);
            for(int i=1;i<=n;i++)
            scanf("%d %d",&dummy1,&dummy2);
            if(n==3)
            printf("1\n2\n3\n");
            else printf("-1\n");
            //system("PAUSE");
            return 0;
}
