#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
string n;
cin >> a >> b;
for (int i = 0; i < a*b; ++i)
cin >> n;
cout << -1;                                                             
}