Diagonals

아직 제출이 없습니다시간 제한8초메모리 제한1024 MB

문제

Diagonals is a pencil puzzle which is played on a square grid. The player must draw a diagonal line corner to corner in every cell in the grid, either top left to bottom right, or bottom left to top right. There are two constraints:

  • Some intersections of gridlines have a number from 00 to 44 inclusive on them, which is the exact number of diagonals that must touch that point.
  • No set of diagonals may form a loop of any size or shape.

The following is a 5!×!55\\!\times\\!5 example, with its unique solution:

Given the numbers at the intersections of a grid, solve the puzzle.

입력

The first line of input contains an integer nn (1n81 \le n \le 8), which is the size of the grid.

Each of the next n+1n+1 lines contains a string ss (s=n+1,s0,1,2,3,4,+\*|s|=n+1, s \in \\{\texttt{0},\texttt{1},\texttt{2},\texttt{3},\texttt{4},\texttt{+}\\}^\*). These are the intersections of the grid, with '+' indicating that there is no number at that intersection.

The input data will be such that the puzzle has exactly one solution.

출력

Output exactly nn lines, each with exactly nn characters, representing the solution to the puzzle. Each character must be either '/' or '\'.

Note that Sample 1 corresponds to the example in the problem description.