After Po the Dragon Warrior defeated Tai Lung with his awesome kung-fu skills, peace was restored to the valley and everyone was happy. However, Master Shifu realized that in the confusion and chaos of the subsequent celebration and valley rebuilding process, the Dragon Scroll was lost. As such, Master Shifu sent Po on a quest to retrieve the Dragon Scroll, wherever it may be.

Po soon finds that someone has taken the Dragon Scroll, leaving a trail of puzzles leading to its hidden location. He finds the first (delectable) puzzle at the entrance of the temple. There are 100 mantous arranged in a grid on a clean wooden board. Yum! Just what Po needs -- breakfast. Some are the traditional white mantous, while some are the brown deep-fried mantous. As a result, they form a pattern on the grid. A note on the side reads: "Eat the mantous at prime positions and let gravity work its magic. Therein lies the clue to the next puzzle." Oh no! Math. Not Po's forte. He sure can eat the mantous, but he can't figure out which mantous to eat.

The mantous are arranged in this configuration, with 'o' representing a fried mantou and '.' representing a traditional white mantou.

.oo.o.....
o.o.....o.
..o.....o.
o.........
..o...o...
..o.....o.
o....o.oo.
..o.....o.
....o.o...
.....ooo..

If each grid cell is numbered from 1 to 100, left to right from the top row, then the prime numbers are in the positions with an 'X':

.XX.X.X...
X.X...X.X.
..X.....X.
X.....X...
X.X...X...
..X.....X.
X.....X...
X.X.....X.
..X.....X.
......X...

Devouring the mantous at these positions yields:

.  . . ...
 . ... . .
.. ..... .
 ..... ...
 . ... ...
.. ..... .
 ....o oo.
 . ..... .
.. .o.o. .
.....o o..

And letting all the mantous "fall" reveals the secret message:

   . . . .
 . ... . .
 . ... . .
 . ... . .
 . ... . .
.. ... ...
.. ..o.o..
..........
....o...o.
.....ooo..

Given the size of the grid, and the configuration of the board, help Po figure out what the secret message is.

Input

The first line includes one integer, n, representing the size of the grid.
Lines 2 to n + 1 contain a line of characters each, representing the mantous that are placed on the grid.

For 20% of the test cases, 1 ≤ n ≤ 50.
For 50% of the test cases, 1 ≤ n ≤ 200.
For 100% of the test cases, 1 ≤ n ≤ 1,000.

Output

Output n lines, representing what the mantou grid will look like after all the mantous at prime number positions have been eaten, and all the mantous have "fallen" to the ground, using a space ' ' to represent empty grid positions.

Sample Input

10
.oo.o.....
o.o.....o.
..o.....o.
o.........
..o...o...
..o.....o.
o....o.oo.
..o.....o.
....o.o...
.....ooo..

Sample Output

   . . . .
 . ... . .
 . ... . .
 . ... . .
 . ... . .
.. ... ...
.. ..o.o..
..........
....o...o.
.....ooo..