Your task is to write a program to perform character recognition. Don't worry, you only need to recognize 1, 2, and 3, as follows:
.*. *** *** .*. ..* ..* .*. *** *** .*. *.. ..* .*. *** ***
Input
The input contains only one set of data, consisting of 6 lines. The first line is the number of characters $n$ ($1 \le n \le 10$). The following 5 lines each contain $4n$ characters. Each character occupies exactly 5 rows and 3 columns, followed by an empty column (filled with ".").
Output
The output should contain one line, which is the recognized characters.
Examples
Input 1
3 .*..***.***. .*....*...*. .*..***.***. .*..*.....*. .*..***.***.
Output 1
123