NAJA - Add

Alice’s younger sister just started to go school. Today she learns addition in her class. But she can’t do it well. Her class teacher gives some assignment. Her teacher gives two integer numbers to add. She tries to add the numbers but sometime she fail in case of some critical numbers and puts ‘?’ marks at those positions.

Now you help Alice’s sister. You just give her the solution where she write down ‘?’ marks and if she done well then write ‘OK’.

Input

The first line of the input contains an integer T (T ≤ 1000) denoting the number of test cases. Each test case contains three lines given A, B and  C. A and B is her assignment number and C is Alice’s sister's answer. 0 ≤ A, B ≤ 99999 and C will contain with number and ‘?’.

Output

For each case, print the case number and the number deserve solution.

Sample

Input:
4
123
123
?46
234
34
?68
12345
12371
?4?1?
421
32
453

Output:
Case 1: 2
Case 2: 2
Case 3: 276
Case 4: OK

Added by:Najmuzzaman
Date:2014-10-25
Time limit:0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2018-08-24 20:20:43
The pattern with problems from Najmuzzaman: if told to read blanklines between cases, don't; if not, do. This is the latter case.
2015-05-21 18:15:40 Divyansh Bajpai
'?' stands for just a single digit number or it can have multi-digit number also?
eg: A=999
B=99
C=???
then,C will be 1098 or just 098 ?
ANS: In this Case C will be ???? and the ans is 1098

Last edit: 2015-10-13 19:53:42
2015-05-21 07:59:56 Addy
what if the solution contains no '?' but is wrong ??
Ans: Output will be OK

Last edit: 2015-10-13 19:54:56
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.