E. Top Student ProblemⅠ
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

To become a top student, Emolga is learning to count cubes.

In a $$$3\times 3 \times 3$$$ space, there are some unit cubes stacked together.

Emolga counts this cube stack by recording the number of cubes at each position in the top view. Now it gives you the recorded height matrix. Please reconstruct the front view and the left view of the cube stack.

Input

Each test file contains multiple test cases.

The first line contains an integer $$$T$$$ $$$(1 \leq T \leq 10^5)$$$, the number of test cases.

For each test case, input a $$$3\times 3$$$ integer matrix $$$h_{i,j}$$$ $$$(0 \leq h_{i,j} \leq 3)$$$, representing the height matrix.

Output

For each test case, output two $$$3\times 3$$$ character matrices made of * and ., representing the front view and the left view of the cube stack.

Here * means there is a cube at that position, and . means there is no cube at that position.

Example
Input
2
1 2 3
1 2 2
0 1 1
3 3 3
2 2 2
1 1 1
Output
..*
.**
***
*..
**.
***
***
***
***
*..
**.
***
Note

The figure below shows the cube stack, height matrix, front view, and left view for the first test case in Sample 1.