Gokigen Naname#547

Gokigen Naname

1 second
64 megabytes
Hard

Gokigen Naname is a Japanese puzzle played on a square grid. Numbers in circles are placed at some of the intersections of the grid.

The goal is to draw a diagonal line in each cell of the grid, so that the number in every circle equals the number of lines extending from that circle. Additionally, it is forbidden for the diagonal lines to form a closed loop.

The first figure shows the initial puzzle position. The second figure shows its solution. A Gokigen Naname puzzle always has a unique solution.

Input

The first line contains the number of cells (2 \leq n \leq 7) on each side of the square grid. Then follow n+1 lines describing the contents at the intersections of the grid. Each such line consists of n+1 characters: each character is either a digit from to inclusive, or a period (.) indicating no number at the intersection (any number of lines may be incident to it).

Output

Output lines, each containing exactly characters. Each character should be a slash (/) or a backslash (), indicating how the corresponding grid cell is filled.

Examples

Example 1

Loading
Loading