1677 - Virgo

Time Limit: 1s Memory Limit: 512MB

Submissions: 24 Solved: 9
Description

Minieye is a perfectionist company, as it has lots of Virgo employees. It is well known that Minieye is committed to how to use science and technology cleverly in driver assistance. Now the Virgo boss is going to build a building composed of some blocks. In order to motivate employees at any time to think about how to use of science and technology cleverly, the boss decided that each block should have the slogan HUST (how to use of science and technology). Unfortunately, the designers are Virgos, too. They believed that this design was very, very ugly and would rather die than drawing.

  As a creative programmer without drawing skills, you stare at the slogan HUST(how to use science and technology) for a few seconds, thinking carefully, and finally come up with an idea that to draw the sketch by yourself, using a text interface, basing a n rows and m columns table that describes the building.

 

Each block looks like:

  +----+

 /----/|

+----+/|

|HUST|/+

|++++|/

+----+ 

 

The boss didn't want you to rotate or flip the blocks.What's more, he required that you must follow the following order when drawing:

 

Left and right

..+----+----+

./----/----/|

+----+----+/|

|HUST|HUST|/+

|++++|++++|/.

+----+----+..

Up and down

..+----+

./----/|

+----+/|

|HUST|/+

|++++|/|

+----+/|

|HUST|/+

|++++|/.

+----+..

Front and behind

....+----+

.../----/|

..+----+/|

./----/|/+

+----+/|/.

|HUST|/+..

|++++|/...

+----+....

 

To keep the sketch tidy, the blank should fill with "." as you see.

 

 

Input

We have multiply cases. For each case:

The first line contains two integers, n, m.(1 <= n, m <= 30)

The second to n+1 line contains m integers each line, which is no more than 30, representing the number of blocks at corresponding gird. 

Output

the picture pyy wants

Sample Input
2 2
1 0
2 1
Sample Output
..+----+.....
./----/|-+...
+----+/|/|...
|HUST|/+----+
|++++|/----/|
+----+----+/|
|HUST|HUST|/+
|++++|++++|/.
+----+----+..
Hint
Source