Silver Matrix#1484

Silver Matrix

1 second
128 megabytes
Easy

If a matrix satisfies the following conditions, we call it a silver matrix.

  1. The matrix has dimensions n \times n.

  2. All its elements belong to the set S = \{ 1, 2, 3, \ldots, 2n-1 \}.

  3. For every integer (1 \leq i \leq n), all elements in the -th row and -th column form the set \{ 1, 2, 3, \ldots, 2n-1 \}.

For example, the following 4 \times 4 matrix is a silver matrix:

It has been proved that a silver matrix of size 2^K \times 2^K always exists. You are required to construct a silver matrix of size 2^K \times 2^K.

Input

A single integer (1 \leq K \leq 9) is given.

Output

Output a silver matrix of size 2^K \times 2^K. You should print 2^K lines, each containing 2^K integers.

Examples

Example 1

Loading
Loading