#P11751. Decrypting the Encrypted Matrix

    ID: 13844 Type: Default 1000ms 256MiB

Decrypting the Encrypted Matrix

Decrypting the Encrypted Matrix

This problem involves a unique encryption method in which each lowercase letter is replaced by a two‐row character matrix. In this problem the original string s only contains the letters v and w. The encryption of each letter is performed as follows:

For letter \(v\), the encryption is given by \[ \begin{aligned} \texttt{\\../}\\ \texttt{.\/ .} \end{aligned} \qquad\text{which is rendered as} \quad \begin{array}{l} \texttt{\textbackslash../} \\ \texttt{.\/ .} \end{array} \]\ (Note: In the actual encrypted matrix the string for v is \../ on the first row and .\/. on the second row.)

For letter \(w\), the encryption is given by \[ \begin{aligned} \texttt{\\../\\../}\\ \texttt{.\/..\/.} \end{aligned} \qquad\text{which is rendered as} \quad \begin{array}{l} \texttt{\textbackslash../\textbackslash../} \\ \texttt{.\/..\/.} \end{array} \] (That is, the string for w is \../\../ on the first row and .\/..\/. on the second row.)

Moreover, when the encrypted matrices for individual letters are concatenated to form the full encrypted matrix, exactly one column that consists only of dots (.) is inserted between every two adjacent letter matrices. Given the two rows of the encrypted matrix, your task is to recover and output the original string.

inputFormat

The input consists of two lines. The first line is the top row and the second line is the bottom row of the encrypted matrix. It is guaranteed that the matrix is obtained by concatenating the encryption blocks of letters (v and w) with exactly one separator column (a column containing only .) between consecutive blocks.

outputFormat

Output the original string composed solely of the characters v and w.

sample

\../
.\/.
v