
Sudoku is a very simple task. A square table with rows and columns is divided to smaller squares 3 \times 3 as shown on the Figure. In some of the cells are written decimal digits from to . The other cells are empty. The goal is to fill the empty cells with decimal digits from to , one digit per cell, in such way that in each row, in each column and in each marked 3 \times 3 subsquare, all the digits from to appear. Write a program to solve a given Sudoku-task.
The input data will start with the number of the test cases. For each test case, lines follow, corresponding to the rows of the table. On each line a string of exactly 9 decimal digits is given, corresponding to the cells in this line. If a cell is empty it is represented by .
For each test case your program should print the solution in the same format as the input data. The empty cells have to be filled according to the rules. If the solution is not unique, then the program may print any one of them.
Separate output data for different test cases with a blank line.
Example 1