#include <iomanip>
#include <iostream>
using namespace std;
int t[1000][1000];
int n,m;
int main (){
cin >> n >> m;
for (int i=1;i<=n;i++){
    for (int j=1;j<=m;j++){
        cin >> t[i][j];
}}
cout << "-1" << endl;




return 0;
}