Welcome to ZOJ
 Contests Information Problems Runs Statistics Ranklist Clarification
60 - ZOJ Monthly, June 2007 - 1006
Gobang Replaying

Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge

Xiao Ming is fond of Gobang( or Five Chess ), and he can replay and save the game after each round for further research. But one day, he found that he coundn't remember the order of his opponent's ( black ) pieces. Fortunately he can remember the order of all the white pieces clearly. We know that Xiao Ming always put the piece beside his opponent's last one, that is at any one of the 8 closest position.

Xiao Ming turns to you for help and you want to write a program to solve the problem.

Input

The first line contains a positive integer N<10, which is the number of rounds. Each round is a 15*15 square. There is a integer in each place, 0 representing no piece, 1 representing a black piece, 2,4,6... representing the white pieces and the order of them.

There is a blank line between each round.

Output

For each round output "Round #i:" in the first line,where i represents the round number. From the second line output a 15*15 square,15 numbers in a line. Each 1 in the input square must be replaced by 1,3,5...which represent the order of the black pieces. Because Xiao Ming maybe wrongly remember the position of the black pieces, there may not have a replay, just output "No solution.".

Print a blank line after each round.

Sample Input

```1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 6 0 0 0 0
0 0 0 0 0 0 0 1 2 1 0 0 0 0 0
0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
0 0 0 0 0 0 0 8 0 4 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
```

Sample Output

```Round #1:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 6 0 0 0 0
0 0 0 0 0 0 0 1 2 5 0 0 0 0 0
0 0 0 0 0 0 0 7 3 0 0 0 0 0 0
0 0 0 0 0 0 0 8 0 4 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
```

Author: CUI, Yanfeng

Submit    Status