In the game of Sudoku, you are given a large 9 x 9 grid divided into smaller 3 x 3 subgrids. For example,
Given some of the numbers in the grid, your goal is to determine the remaining numbers such that the numbers 1 through 9 appear exactly once in (l) each of
nine 3 x 3 subgrids, (2) each of the nine rows, and (3) each of the nine columns.
The input test ile will contain multiple cases. Each test case consists ofa single line containing 8l characters, which represent the 8l squares of the Sudokuerd, given one row at a tme. Each character is either a dgit (trom l to 9 or a perod (used to indcate an umfiled square). You may assume that each puzle mthe input will have exactly one solution. The end-of-file is denoted by a single line containing the word “end”.
For each test case, print a line representing the completed Sudoku puzzle.
.2738..1..1..6735......293.5692.8...........6.1745.364...........9518...7..8..6534......52..8 4.....3...9...5.1...6..2..7........3.....6...1..........7.4.......3.end
527389416819426735436751829375692184194538267268174593643217958951843672782965341416837529982465371735129468571298643293746185864351297647913852359682714128574936