#include <iostream>

using namespace std;

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