I. Nanami and the Golden Sunlight Sunflower Fields
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

Miss YiYi has a $$$n\times n$$$ field of golden sunshine sunflowers, two squares in the field are connected when and only when the two squares have a common edge, now some squares have been planted with sunflowers, now please help her plant at most $$$\lfloor \frac{n\times n}{2} \rfloor$$$ more sunflowers, so that all squares with sunflowers form a connected block (i.e. any pair of squares with sunflowers can reach each other through the sunflower squares). grids form a connected block (i.e., any pair of grids planted with sunflowers can reach each other through the sunflower grid).

Where $$$\lfloor x \rfloor$$$ represents the downward rounding of $$$x$$$, e.g. $$$\lfloor \frac{1}{2} \rfloor=0$$$, $$$\lfloor \frac{9}{2} \rfloor=4$$$ and $$$\lfloor \frac{16}{2} \rfloor=8$$$.

Input

In the first line, an integer $$$t(1\le t \le 50)$$$, representing the number of data sets.

For each data group:

The first row, an integer $$$n(1\le n \le 50)$$$, represents the size of the flower field.

The next $$$n$$$ lines are of length $$$n$$$ consisting only of '#' and '.' strings consisting only of '#' and '.', with '#' representing the grid where the sunflowers are planted and '.' represents the space subgrid.

Output

For each set of data, output a $$$n$$$ line of length $$$n$$$ consisting only of '#' and '.' which is a string consisting of only '#' and '.', with '#' representing the grid where the sunflowers are planted and '.' represents the space sub-grid, which represents your planting scheme, and you cannot move the position of the original sunflower.

It can be proved that there must exist a planting scheme that satisfies Miss YiYi's needs under the conditions required by the question, and any scheme that satisfies the requirements of the question is correct.

Example
Input
6
1
.
2
#.
.#
3
#.#
.#.
#.#
4
..#.
....
##.#
..#.
5
#...#
.....
#...#
.....
#...#
6
.....#
......
......
......
..##..
#.....
Output
.
##
##
###
.#.
###
..##
...#
####
..#.
#...#
#####
#...#
#####
#...#
..####
..#...
..#...
..#...
..##..
###...