spoj#PRLGAME. A Game of Pearls

A Game of Pearls

The game of pearls is to use the following 12 kinds of pearl designs each one and only one time to make the big pearl design.The pearl designs can be rotated and turned over arbitrarily. See the pictures below.

                   The empty grids

              A sample big pearl design

A sample big pearl design used characters instead of colors

      Part A
      Part B
      Part C
      Part D
      Part E
      Part F
      Part G
      Part H
      Part I
      Part J
      Part K
      Part L

Input

Ten test cases(given one after another,you have to process all!), Each contains a big design, 'A'-'L' denote the filled grids, '.' denotes the empty grids,see the example. You can assume that the pearl designs used are completely put into the empty grids.

Output

A big design which has no grids that haven't been filled and each pearl design is used one and only one time in it,or 'No solution'(without quotes) if there's no solution.If there are multiple solutions,output any.

Example

Input:
.
..
...
....
.....
.....C
...CCC.
EEEHH...
E.HHH....
E.........
[and 9 test cases more]

Output: B BK BKK BJKK JJJDD GJGDDC GGGCCCI EEEHHIIA ELHHHIAAF ELLLLIFFFF [and 9 test cases more]

</p>