Sudoku#3524

Sudoku

1 second
64 megabytes
Easy

In the game of Sudoku, you are given a large 9 \times 9 grid divided into smaller 3 \times 3 subgrids. For example,

Given some of the numbers in the grid, your goal is to determine the remaining numbers such that the numbers through appear exactly once in

Input

The input will contain multiple test cases. Each test case consists of a single line containing characters, which represent the squares of the Sudoku grid, given one row at a time. Each character is either a digit (from to ) or a period (used to indicate an unfilled square). You may assume that each puzzle in the input has exactly one solution. The end-of-file is denoted by a single line containing the word end.

Output

For each test case, print a line representing the completed Sudoku puzzle.

Examples

Example 1

Loading
Loading