% Origin: ???, XXXVI SPbSU Championship
\gdef\thisproblemauthor{Olga Bursian}
\gdef\thisproblemdeveloper{Olga Bursian}
\begin{problem}{Snakes on the Stone}
{snakes2.in}{snakes2.out}
{2 seconds (\textsl{3 seconds for Java})}{256 mebibytes}{}

Several three-dimensional snakes lie on a large stone.
Each of them holds its tail in its mouth.
The stone is flat, it has Cartesian coordinate system,
so it's divided into square cells with side of $1$.

The projection of each snake on the stone is a sequence of cells.
Any two neighbouring cells in this sequence are distinct and share a side, 
and it holds also for the last cell and the first cell 
(the tail and the head of a snake).

We say a snake is \textit{passing a cell} $t$ times if this cell is
repeated $t$ times in the sequence of cells into which this snake is projected.

Let's call a cell an \textit{intersection} if it is passed by more 
than one snake, or if it is passed by one snake more than once.
A snake is passing an intersection \textit{from above} if the corresponding 
part of the snake is farther from the stone than other parts of snakes that
are projected into that intersection. By analogy, a snake is passing an
intersection \textit{from below} if the corresponding part of the snake 
is closer to the stone.

The snakes lie on the stone in such a way that there exist only two types 
of intersections. The first type is an intersection that is passed by the only
snake for two times: once from above and once from below. The second type
is an intersection that is passed by two snakes, one from above
and one from below.
Besides, neither pair of intersections is located in adjacent cells,
and all the snakes cross intersections straight.

Let $i$-th snake pass intersections $r_{i}$ times in total.
It may pass some of them once, and some of them twice.
Each time it passes an intersection either from above
(denote it ``\texttt{+}'') or from below (denote it ``\texttt{-}'').
We will specify a way of passing intersections by the snake with the line
that consists of symbols ``\texttt{+}'' and ``\texttt{-}'', recorded for
all the intersections met traversing the snake from head to tail.

Consider $k$ sequences of cells corresponding to $k$ snakes ($1 \le k \le 3$).
The total number of intersections for these sequences does not exceed $7$,
and each snake passes an intersection at least once.
The coordinates of cells lie within range from $1$ to $m = 25$.

%Данные ограничения вызваны сложностью написания чекера. 
%Существует решение за линейное время от количества перекрёстков 
%(не считая чтения). 

You have to find such a way of passing 
intersections that the snakes holding their tails in their mouths 
can take such positions in space that their projection to the stone would be 
$k$ non-intersecting circumferences (neglecting snakes' width).


\InputFile


The first line of input contains one integer $k$, the number of snakes
($1 \le k \le 3$).
Each of the following $k$ lines describes one snake.
The description of snake $i$ starts with an integer $l_{i}$:
the length of the snake ($4 \le l_{i} \le m^2$).
It is followed by $l_{i}$ pairs of integers
$x_{i, 1}$, $y_{i, 1}$, $x_{i, 2}$, $y_{i, 2}$, $\ldots$,
$x_{i, l_{i}}$, $y_{i, l_{i}}$: the coordinates of cells
that are passed by the snake, given in the order of traversal
($1 \le x_{i, j},y_{i, j} \le m$).

\OutputFile

Output $k$ lines containing symbols ``\texttt{+}'' and ``\texttt{-}'';
$i$-th line should specify a way to pass intersections for the $i$-th snake.
Output has to be correct, so that each intersection is 
passed by snakes once from above and once from below. 

If there exist multiple answers, output any of them.

\Examples
{
\scriptsize
\begin{examplewide}
\exmp{%
1
72 2 5 3 5 4 5 5 5 6 5 7 5 8 5 9 5 10 5 11 5 11 6 11 7 11 8 10 8 9 8 8 8 7 8 6 8 5 8 5 9 5 10 5 11 5 12 5 13 5 14 6 14 7 14 8 14 8 13 8 12 8 11 8 10 8 9 8 8 8 7 8 6 8 5 8 4 8 3 8 2 9 2 10 2 11 2 12 2 13 2 14 2 14 3 14 4 14 5 14 6 14 7 14 8 14 9 14 10 14 11 13 11 12 11 11 11 10 11 9 11 8 11 7 11 6 11 5 11 4 11 3 11 2 11 2 10 2 9 2 8 2 7 2 6
}{%
{+}{-}{+}{+}{+}{-}{-}{-}
}
\end{examplewide}
\begin{examplewide}
\exmp{
2
36 5 2 5 3 5 4 5 5 5 6 5 7 5 8 5 9 5 10 5 11 5 12 5 13 5 14 5 15 5 16 5 17 6 17 7 17 8 17 8 16 8 15 8 14 8 13 8 12 8 11 8 10 8 9 8 8 8 7 8 6 8 5 8 4 8 3 8 2 7 2 6 2
36 2 5 2 6 2 7 2 8 2 9 2 10 2 11 2 12 2 13 2 14 3 14 4 14 5 14 6 14 7 14 8 14 9 14 10 14 11 14 11 13 11 12 11 11 11 10 11 9 11 8 11 7 11 6 11 5 10 5 9 5 8 5 7 5 6 5 5 5 4 5 3 5
}{%
{-}{-}{+}{+}
{+}{-}{-}{+}
}%
\end{examplewide}
}

\Explanations
The length and coordinates of the cells of each snake are placed in one line.
In the problem statement, that line is broken into several lines
for readability.

\begin{figure}[ht]\centering
\parbox[b]{0.49\textwidth}{\centering
\includegraphics[scale=0.5]{snakes2.1}}
\hfil\hfil%раздвигаем боксы по горизонтали
\begin{minipage}[b]{0.49\textwidth}
\centering
\includegraphics[scale=0.5]{snakes2.2}
\end{minipage}
\end{figure}

In the first example, there is the only snake. The answer to the example 
corresponds to the left picture, where the snake is easily untangled.
And, for example, the path

\texttt{{+}{-}{+}{-}{+}{-}{+}{-}}

corresponds to the right picture, and this answer would be incorrect.

\vskip20pt

\begin{figure}[ht]\centering
\parbox[b]{0.49\textwidth}{\centering
\includegraphics[scale=0.5]{snakes2.3}}
\hfil\hfil%раздвигаем боксы по горизонтали
\begin{minipage}[b]{0.49\textwidth}
\centering
\includegraphics[scale=0.5]{snakes2.4}
\end{minipage}
\end{figure}

In the second example, the answer also corresponds to the left picture.
One rectangle can be pulled out from another and so the snakes are untangled.

And, for example, the path

\texttt{{-}{+}{-}{+}}

\texttt{{-}{+}{-}{+}}

corresponds to the right picture, and this answer would be incorrect.


\end{problem}
