Problem C: NumPuzz II

We consider again the iPhone game NumPuzz. Please refer to Problem B: NumPuzz I for details of the game.

This task may be thought of as the opposite of Problem B. Write a program that accepts as input an initial configuation of a game instance, and returns a solution that takes the fewest clicks possible.

Input

The input format here corresponds exactly to the output format of Problem B. The first line of each case gives the case number, and the following three lines contains the matrix entries at the start of the game.

Output

For each test case, output a string that describes an optimal solution to the given puzzle. Use "a" to represent the upper left corner, "b" for the square to its right, etc. Print an empty line if no clicks are required. If the puzzle is unsolvable, output "No solution." instead.

Sample Input

Case #1:
1 1 1
1 1 1
1 0 0
Case #2:
0 0 0
0 0 0
0 0 0
Case #3:
3 3 3
3 4 3
3 3 3

Sample Output

cd

cdifbgah


Problemsetter: Mak Yan Kei
NumPuzz is an app by Marmottajr