N Queens - placement#10236

N Queens - placement

1 second
128 megabytes
Very easy

Given a chess board having n \times n cells. You need to place queens on the board in such a way that no queen attacks any other queen.

Input

The size of the chess board (1 \le n \le 10).

Output

If it is possible to place all the queens in such a way that no queen attacks another queen, then print lines having integers. The integer in -th line and -th column will denote the cell of the board and should be if a queen is placed at and otherwise. If there is more than one way of placing queens print any of them. If it is not possible to place all queens in the desired way, then print "Not possible" (without quotes).

Examples

Example 1

Loading
Loading