#include <bits/stdc++.h>
#include <iostream>
#include <iomanip>
using namespace std;
int a,b;
int d[1000000];
int main (){
cin >> a >> b;
for (int i=1;i<=a;i++){
    for (int j=1;j<=b;j++){
        cin >> d[i];
    }
}
cout << "-1" << endl;









return 0;
}