#include<bits\stdc++.h>

using namespace std;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long n, m, ax = 0, ay = 0, bx = 0, by = 0;
    cin>>n>>m;
    for(int i = 0; i < n; i++)
    {
        char c;
        for(int j = 0; j < n; j++)
        {
            cin>>c;
        }
    }
    cout<<-1;
}