using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
	class Program
	{
		static void Main(string[] args)
		{
			string[] unos = Console.ReadLine().Split();
			int h = int.Parse(unos[0]);
			int n = int.Parse(unos[1]);

			bool[,] vodopad = new bool[h, n];

			for (int i = 0; i < h; i++)
			{
				unos = Console.ReadLine().Split();
				for (int j = 0; j < n; j++)
				{
					vodopad[i, j] = Convert.ToBoolean(int.Parse(unos[j]));
				}
			}
			for (int i = 0; i < h; i++)
			{
				for (int j = 0; j < n; j++)
				{
					Console.Write(vodopad[i, j]);
				}
				Console.WriteLine();
			}
		}
	}
}