Sudoku
A Sudoku grid is a 16×16 grid of cells grouped in sixteen 4×4 squares, where some cells are filled with letters from A to P (the first 16 capital letters of the English alphabet), as shown in figure 1a. The game is to fill all the empty grid cells with letters from A to P such that each letter from the grid occurs once only in the line, the column, and the 4×4 square it occupies. The initial content of the grid satisfies the constraints mentioned above and guarantees a unique solution.
Input
Each data set encodes a grid and contains 16 strings on 16 consecutive lines as shown in sample input/utput. The i^th string stands for the i^th line of the grid, is 16 characters long, and starts from the first position of the line. String characters are from the set {A, B, …, P, -}, where "–" (minus) designates empty grid cells. The data sets are separated by single empty lines and terminate with an end of file.
Output
The program prints the solution of the input encoded grids in the same format and order as used for input.