Sudoku is a puzzle played on a 9 by 9 grid. The digits from 1 to 9 must appear exactly once in every row, every column, and every 3 by 3 box.
For this problem, you may use only cross-hatching. In cross-hatching, choose one digit, then exclude every row, column, and 3 by 3 box where that digit already appears. If a 3 by 3 box has exactly one empty cell where the chosen digit can still go, fill that cell with the digit.

You are given a partially filled Sudoku puzzle. Repeatedly apply only cross-hatching until no more cells can be filled by this method, then print the resulting grid. You must not fill cells by any other method.
The input puzzle may already violate Sudoku rules, or it may contain a contradiction where some required digit has no legal cell in a row, column, or 3 by 3 box. These cases must also be detected.
The input consists of 9 lines. Each line has 9 characters, and each character is either a digit from 1 to 9 or .. A period represents an empty cell.
If the puzzle follows Sudoku rules and has no contradiction, print the grid after applying only cross-hatching, using the same 9-line format as the input. Otherwise, print ERROR.