eolymp
bolt
Try our new interface for solving problems
Problems

Annealing peaceful queens!

Annealing peaceful queens!

Time limit 2 seconds
Memory limit 64 MiB

Arrange N queens on a square N×N board, so that no two hit each other - a very difficult task. That's why it instructed you.

Input data

In a single input line is the number 4N200 - size board.

Output data

Output of N numbers a: a_i - is the number of horizontal, on which you put the queen occupying the i-thuja vertical. Numbering of contours comes from the bottom up, from 1 to N (as in conventional chess board).

Examples

Input example #1
5
Output example #1
4 2 5 3 1