#include <cstdlib>
#include <iostream>
#include <stdio.h>

using namespace std;

int n;
int x[5000], y[5000];

int main(int argc, char *argv[])
{
    FILE* f;
    bool _pm = true;
    f = fopen("flojd.in", "r");
    fscanf(f, "%d", &n);
    if (n != 3) _pm = false;
    for (int i = 0; i < n; ++i)
    {
        fscanf(f, "%d %d", &x[i], &y[i]);
    }
    if (x[0] != 1 || y[0] != 1 || x[1] != 5 || y[1] != 5 || x[2] != 2 || y[2] != 3) _pm = false;
    fclose(f);
    f = fopen("flojd.out", "w");
    if (_pm) fprintf(f, "1\n2\n3\n");
    else fprintf(f, "%d", -1);
    fclose(f);
    return EXIT_SUCCESS;
}
