Sudoku

Time limit1sMemory limit128 MB

Problem

Sudoku is played on a $9 \times 9$ grid that is divided into nine $3 \times 3$ boxes. You must fill the grid with the digits $1$ through $9$ so that every digit appears exactly once in each row, exactly once in each column, and exactly once in each $3 \times 3$ box.

A puzzle is given as a $9 \times 9$ grid in which a filled cell holds its digit and an empty cell holds $0$. Given such a puzzle, write a program that solves it.

Input

The first line contains the number of test cases. Each test case consists of $9$ lines describing a Sudoku grid; each line is a string of $9$ digits from $0$ to $9$, where $0$ marks an empty cell. Every test case contains exactly five $0$s.

Output

If the grid cannot be completed without breaking the Sudoku rules, print

Could not complete this grid.

Otherwise, print the solved grid over $9$ lines using the same format as the input. Print a blank line between consecutive test cases. Whenever a grid can be solved, the input is guaranteed to have a unique solution.