Contests | Virtual Contests | Problems | Submit | Runs Status | Rank List | Forum |

Time Limit: 1.0 Seconds Memory Limit: 65536K

Total Runs: 205 Accepted Runs: 141 Multiple test files

The table surface is divided into *N* by *M* square cells.
Some cubes are stacked one upon another over the cells, forming towers.
For each cell the number of cubes stacked over it is given in the matrix
A.

The dot
(ASCII 46) must be used as a background.
*Constraints*

*Input format*

*Output format*

*Sample input #1*

*Sample output #1*

*Sample input #2*

*Sample output #2*

Your program must output the view of the table in ASCII graphics, where each cube is represented as shown below:

+---+ / /| +---+ | | | + | |/ +---+ |
(here the characters used are `'+'` ,
`'-'` , `'/'` , `'|'` , their ASCII
codes are ASCII 43, 45, 47, 124) |

1 ≤ *N*, *M*, *A _{ij}* ≤ 50

Input contains integers *N* *M*, followed by matrix
*A*, row-by-row. The first row describes the cube tower furthest from
the viewer, left to right, and the last row -- nearest to the viewer.

Output must contain a string representation of the table view, with minimal number of lines required to show all cubes. Each line must contain a string of equal length, which is the minimal width required to show all cubes.

```
3 4
1 1 1 1
1 2 1 1
1 1 1 1
```

```
........+---+..........
......+/ /|-+---+---+
...../+---+ |/ / /|
....+-| | +---+---+ |
.../ | |/ / /| +
..+---+---+---+---+ |/.
./ / / / /| +..
+---+---+---+---+ |/...
| | | | | +....
| | | | |/.....
+---+---+---+---+......
```

```
3 5
2 2 1 2 2
2 2 1 1 2
3 2 1 2 2
```

```
......+---+---+...+---+---+
..+---+ / /|../ / /|
./ /|-+---+ |.+---+---+ |
+---+ |/ /| +-| / /| +
| | +---+ |/+---+---+ |/|
| |/ /| +/ / /| + |
+---+---+ |/+---+---+ |/| +
| | | +-| | | + |/.
| | |/ | | |/| +..
+---+---+---+---+---+ |/...
| | | | | | +....
| | | | | |/.....
+---+---+---+---+---+......
```

Maintance:G.D.Retop. Developer: SuperHacker, G.D.Retop