Su-Su-Sudoku#3523

Su-Su-Sudoku

1 second
64 megabytes
Very easy

By now, everyone has played Sudoku: you are given a 9 \times 9 grid of cells which you must fill in with the digits through so that

  1. every row contains all nine digits,

  2. every column contains all nine digits, and

  3. each of the nine 3 \times 3 subgrids contains all nine digits.

To start the game, you are given a partially completed grid and are asked to fill in the remainder of the cells. One such puzzle is shown below.

In this problem, you are given Sudoku grids which you have nearly completed; in fact, you have filled in every cell except five. You are asked to complete the grid, or determine that it is impossible. (You might have already made an error!)

Input

The first line of input contains a positive integer indicating the number of test cases to follow. Each test case will be a nearly completed Sudoku grid consisting of lines, each containing characters from the set of digits through . There will be exactly five s in each test case, indicating the five unfilled cells.

Output

The output for each test case should be either

Could not complete this grid.

if it is impossible to complete the grid according to the rules of the game, or the completed grid, in the form given below (there are no spaces in the output). If there is a way to complete the grid, it will be unique. Separate test cases with a blank line.

Examples

Example 1

Loading
Loading