#include <iostream>

using namespace std;

int main()
{
    unsigned long long int n;
    char a[1000][1000];
    int w,h;
    cin >> w >> h;
    for(int i=0;i<h;++i)
        for(int j=0;j<w;++j)
        {
            cin >> a[i][j];
        }
    
    
    
    cout << -1 << endl;


    return 0;
}