Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
What time is it?
Time Limit: 1000MSMemory Limit: 10000K
Total Submissions: 2209Accepted: 865

Description

An accutron shows time with four digits, from 0000 to 2359. Every digit is represented by 3*3 characters, including '|'s, '_'s and blanks. When the LCD screen works well, the digits look like the following:
 _     _  _     _  _  _  _  _ 

| | | _| _||_||_ |_ ||_||_|
|_| ||_ _| | _||_| ||_| _|


There are two accutrons at hand. One shows the accurate time, and the other is 15 minutes late. For example, at 8:25am, the first accutron shows '0825', while the second shows '0810'.

Unfortunately, there is something wrong with the two LCD screens, namely some parts of the digits missed. Your task is to decide the accurate time, according to the fragmental digits showed on the two accutrons.

Input

The first line of the input is a single integer t (1 <= t <= 20), the number of test cases. Each case contains three lines, indicating the time on the accurate accutron and the time on the slow accutron, separated by a blank column. (Please refer to the Sample Input.)

Output

For each input, print the accurate time with four digits if it can be ensured, or otherwise the string 'Not Sure'.

Sample Input

2
    _  _  _      _     _ 
  | _  _||       _   ||  
  | _ |_   |   | _    |_|
    _  _  _   _  _     _ 
  ||_  _||       _|  ||  
  | _ |_   |   ||     |_|

Sample Output

Not Sure
0825

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator