StuPId

No attempts yetTime limit3sMemory limit128 MB

Problem

At DUT, the Dreamland University of Technology, every student has a personal id number with six or seven digits. These are not arbitrary numbers: an id is valid only if its checksum ends in the digit zero.

The checksum is computed as follows. Reading the digits from back to front, multiply them by the repeating factors 9, 3, 7 (the last digit uses 9, the second-to-last uses 3, the third-to-last uses 7, the fourth-to-last uses 9 again, and so on). Then add all of the products together.

For example:

id number :  1  3  9  0  2  7  2
factors   :  9  7  3  9  7  3  9
products  :  9 21 27  0 14 21 18

Here the checksum is 9 + 21 + 27 + 0 + 14 + 21 + 18 = 110. Its last digit is zero, so this id is valid.

Sometimes a student's handwriting is so bad that a teaching assistant cannot read one of the digits. You must help in the special case where exactly one digit is unreadable. Because 9, 3, and 7 are each relatively prime to 10, the missing digit is always uniquely determined. The students always start out focused, so the first digit is always readable and is never zero.

Input

The first line contains the number of scenarios. Each scenario is given on a single line: an id number of length six or seven in which exactly one digit has been replaced by a question mark (?).

Output

For each scenario, first print a line "Scenario #i:", where i is the scenario number starting at 1. On the next line, print the complete, corrected id number. Separate consecutive scenarios with a blank line.