7행 21열 ASCII 그림으로 주어진 7세그먼트 디지털 시계 화면을 읽어 24시간 형식 HH:MM 시각을 알아낸다.
보통4구현시뮬레이션문자열완전 탐색아직 제출이 없습니다시간 제한1초메모리 제한512 MBLittle 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 T: the number of test cases (1≤T≤1440).
Each test case is given on seven lines as a 7×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 t formatted as "HH:MM": the time shown on the clock (00:00≤t≤23:59).