|
Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Автор: Павел Кузнецов, ПГУ.
Once a king of Byteland conceived repair in his palace. It was
necessary to break a pair of walls and make a banquet hall more
spacious. When he planned a floor, he thought what would be more
beautifil - marble or wooden parquet. Marble is more smooth, but
it would be more painful to fall on it, so the king chose parquet.
And he wanted something unusual. Palace hall is a square with side
N meters. Every parquet piece is a square with side 1 meter
and of white or black color. There are enough pieces of each color
to cover the floor with them. But the king askes you to lay the
floor with the pieces, considering the following conditions:
• The four corner pieces must have the same color.
• Every piece must have at least 2 neighbour pieces of other color.
Two pieces are neighbours if they contact by a side.
Your task is to present the plan of covering the floor or to say
if it is impossible.
Input
The first line contains an integer number N (3 ≤ N ≤ 200).
Output
If it is impossible to lay the hall in the way the king asked,
write "NO SOLUTION " without quotes. Otherwise, output
must contain N lines, N symbols length each. White
pieces must be presented as '.' (dot), black '#' (sharp).
Input 1
|
Output 1
|
3
|
.#.
#.#
.#.
|
Для отправки решений необходимо выполнить вход.
|