//#include "pch.h"
//#include <stdio.h> 
#include <iostream>
int main()
{
	int a, b;
	char e;
	std::cin >> a >> b;
	for (int i = 0; i < a; i++)
	{
		for (int j = 0; j < b; j++)
		{
			std::cin >> e;
		}
	}
	std::cout << "-1";
	//return 0;
}