Gromah and LZR have entered the third level. There is a blank grid of size

, and above the grid is a word "CDMA".
In CDMA Technology, a Technology about computer network, every network node should be appointed a unique binary sequence with a fixed and the same length. Moreover, if we regard

in the sequence as

, and regard

as

, then these sequences should satisfy that for any two different sequences

, the inner product of

should be exactly

.
The inner product of two sequences

with the same length

equals to

.
So, the key to the next level is to construct a grid of size

, whose elements are all

or

, and for any two different rows, the inner product of them should be exactly

.
In this problem, it is guaranteed that

is a positive integer power of

and there exists some solutions for input

. If there are multiple solutions, you may print any of them.