Your job is to read the information for a partially played game and to print the corresponding board.
The first line of input contains how many game you have to solved followed by blank line.
The first line of each description contains a single postitive integer n ≤ 10. The next n lines represent the positions of the mines. Each line represents the contents of a row using n characters: a period indicates an unmined position while an asterisk indicates a mined position.
The next n lines are each n characters long: touched positions are denoted by an ‘x, and untouched positions by a period.
The sample input corresponds to the middle figure above.
There is a blank line between each consecutive game description.
For each test case, your output should represent the board, with each position filled in appropriately. Positions that have been touched and do not contain a mine should contain an integer between 0 and 8. If a mine has been touched, all positions with a mine should contain an asterisk. All other positions should contain a period.
Print a blank line between each consecutive 2 consecutive test cases.