#include <stdio.h>

char c;

void main()
    {
    int a,b,i,j;
    scanf("%d %d", &a, &b);
    a = a*a;
    for (i = 0 ; i <= a ; i++)
        {
        scanf("%c", &c);
        }
    printf("-1");
    }