#include <iostream>
#include <string>
using namespace std;
char [10][10];
int n, m, 
int main () {

    cin>>n>>m;
    
    for (int i=0; i<n; i++) {
        for (int j=0; j<m; i++) {
            cin>>char[i][j];
        }
    }
    cout<<-1<<endl;
    return 0;
}