Limits 1s, 512 MB

You will be given two numbers and an operation to do with them. You just need to print the output of the numbers after doing the operation.

The digits you need to print are in the above image. Each digit is a 3 x 5 matrix filled with asterisk ('*') sign. Print the final absolute value of your output separated by a space for each digits.

Input

First line of input will be TT (1T151 ≤ T ≤ 15) the number of test cases. Each test will contain a line having two integers XX and YY (100000X,Y100000-100000 ≤ X, Y ≤ 100000) and a character CC ('+', '-', '') denoting the addition ('+'), subtraction ('-'), multiplication ('') operation.

Output

Output each case like following format: "Case #x:", where xx being the number of the case. And in a new line print absolute value of the desired output separated by space for each digits. Print a blank line after each case except the last one.

Sample

InputOutput
2
5 + 5
9 * 9
Case #1:
 *  ***
 *  * *
 *  * *
 *  * *
 *  ***

Case #2:
***  * 
* *  * 
***  * 
* *  * 
***  * 

Submit

Login to submit.

Statistics

84% Solution Ratio
edge555Earliest, Sep '19
edge555Fastest, 0.0s
edge555Lightest, 0 B
touhidurrrShortest, 458B
Toph uses cookies. By continuing you agree to our Cookie Policy.