Once every generation, there is a tournament known as Mortal Kombat, which was designed by the Elder Gods for the main purpose of saving Earthrealm from the dark forces of Outworld. If the forces of Outworld win the tournament ten consecutive times, the Emperor will be able to invade and conquer Earthrealm. Thus far, Outworld has won nine straight victories, making the upcoming tournament the tenth, and possibly final, one for Earthrealm.
There are monsters and best human fighters participating in Mortal Kombat. According to the tournament rules, each monster should fight one of the humans (and each monster must fight a different human). If at least one monster wins, Earthrealm will be conquered by the Emperor of Outworld. However, the humans can choose the competitors and the order of battles.
The thunder god Raiden, protector of Earthrealm, should choose the fighters in such a way that all Earth warriors will win their battles. For each monster and each Earth warrior, it is known whether the Earth warrior can defeat the monster. First of all, the fighters for the first battle must be chosen.
For example, suppose that Liu Kang wants to fight Goro, but he is the only warrior able to defeat Shang Tsung, while Goro can be defeated by other warriors, such as Johnny Cage. So, even if Liu Kang defeats Goro in the first battle, it will inevitably lead to the conquest of Earth, because later Shang Tsung will defeat his opponent. This means that the pair Liu Kang vs. Goro should not be selected for the first fight.
Find out which pairs cannot be chosen by Raiden if he wants to save the freedom of humanity.
The first line contains integers and (1 \le N \le 300, N \le M \le 1500). The next lines contain the binary matrix of size N \times M. A_{ij} = 1 if and only if the -th Earth warrior can defeat the -th monster.
Output matrix of size N \times M. B_{ij} should be equal to one if the first battle cannot be held between the -th monster and the -th human, and zero otherwise.
Example 1