Time to get up!

7행 21열 ASCII 그림으로 주어진 7세그먼트 디지털 시계 화면을 읽어 24시간 형식 HH:MM 시각을 알아낸다.

보통4구현시뮬레이션문자열완전 탐색아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Little Q's alarm is ringing! It's time to get up now! However, after reading the time on the clock, Little Q lies down and starts sleeping again. Well, he has five alarms, and it's just the first one, he can continue sleeping for a while.

Little Q's clock uses a standard 7-segment LCD display for all digits, plus two small segments for the ":", and shows all times in 24-hour format. The ":" segments are on at all times.

Your job is to help Little Q read the time shown on his clock.

입력

The first line of the input contains an integer TT: the number of test cases (1T14401 \leq T \leq 1440).

Each test case is given on seven lines as a 7×217 \times 21 ASCII image of the clock screen.

Each digit segment is represented by two characters, and each colon segment is represented by one character. Character "X" indicates a lit segment, character "." indicates a dark segment or empty space. See the sample input for details.

출력

For each test case, print a single line containing a string tt formatted as "HH:MM": the time shown on the clock (00:00t23:59\texttt{00:00} \leq t \leq \texttt{23:59}).