#include <iostream>
#include <vector>
#include <string>
using std::cout, std::cin;
using std::string, std::vector;
string buf;
uint8_t real_m, real_n;
uint8_t m, n;
vector<vector<bool>> field(m, vector<bool>(n));
void read_unuseful_line()
{
for (uint8_t i = 0; i < n; i++)
{
cin >> buf;
}
}
void do_input()
{
cin >> buf;
real_m = stoi(buf);
m = real_m - 2;
cin >> buf;
real_n = stoi(buf);
n = real_n - 2;
read_unuseful_line();
for (uint8_t i = 0; i < m; i++)
{
cin >> buf;
for (uint8_t j = 0; j < n; j++)
{
cin >> buf;
field[i][j] = stoi(buf);
}
cin >> buf;
}
read_unuseful_line();
for (auto row : field)
{
for (auto col : row)
{
cout << col << ' ';
}
cout << '\n';
}
}