Recently, Kvanta became fascinated by cryptarithms. During her practice she came across a task she cannot solve, so Kvanta asks you for help.
You are given three strings s_1, s_2, s_3 (the length of each does not exceed characters). Every character of a string is either an uppercase Latin letter A...Z, or a decimal digit 0...9.
It is required to assign a unique decimal digit to every distinct letter in such a way that the following conditions hold:
identical letters correspond to identical digits, different letters—to different digits;
in each of the three numbers, after the substitution, the first character is not 0;
after substituting the letters and taking into account any digits already present, the equality s_1 + s_2 = s_3 holds, where the strings are interpreted as non-negative integers.
You must find at least one triple of numbers that satisfies all the conditions, or tell Kvanta that she has been wasting her time and such a triple does not exist.
The input consists of three lines.
In the -th line a string s_i is given (1 \le |s_i| \le 18). Every character of s_i is either an uppercase Latin letter or a decimal digit.
If a solution exists, output three numbers—the values of s_1, s_2 and s_3 after replacing all letters by the corresponding digits. Print the numbers in the same order, one per line.
If there is no valid assignment, output .
If there are several solutions, you are allowed to print any of them.
Example 1
Example 2
In the first example, after substituting A = 3, B = 1, C = 4, we get 93 + 31 = 124, which satisfies the cryptarithm.
In the second example, there is no way to assign distinct digits to the letters so that the sum of the first two numbers equals the third; therefore, the output is .