Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

HS12DISU - O-Diagonal sudoku

Sudoku is an ancient Japanese puzzle game. If You do not know the rules, you can read them here.

This variant of the puzzle is called diagonal sudoku.

The goal is to fill a 9x9 playing grid with numbers from 1 to 9 so that in every row and in every column, all nine numbers are different. Also, each of the nine 3x3 parts of the sudoku grid must contain all the different numbers 1 to 9, and finally each of the two diagonals must contain all the different numbers from 1 to 9.

Input

You are given the initial state of a diagonal sudoku board, in the form of nine characters in nine rows. There are no empty spaces between characters in the rows. Unknown fields in sudoku are represented with dots ('.') and all others are represented by digits from 1 to 9. 

Output

Print your solution in the same format as in the input. A real sudoku board must have a unique solution but ours can have multiple solutions. You are allowed to print any of them. For every test case at least one solution exists.

Input:
.45...63.
2...1...5
9..8.5..7
..9...3..
.3.....7.
..8...5..
8..5.3..1
5...2...3
.26...95. Output: 145792638
287316495
963845217
459271386
632458179
718639542
894563721
571924863
326187954

Scoring

By solving this problem you score 10 points.


Added by:Tata Dule
Date:2012-11-27
Time limit:0.100s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:ADA95 ASM32 BASH BF C CSHARP C++ 4.3.2 CPP C99 CLPS CLOJURE LISP sbcl LISP clisp D ERL FSHARP FORTRAN GO HASK ICON ICK JAVA JS-RHINO LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PERL6 PHP PIKE PRLG-swi PYTHON PYTHON3 RUBY SCALA SCM guile SCM qobi ST TCL WHITESPACE
Resource:High School Programming League 2012/13

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.