In search of inspiration for problems, Slava went to scour the vastness of the internet — and found an interesting riddle.
The riddle took the form $$$A + B = C$$$, where the digits of the numbers $$$A$$$, $$$B$$$, and $$$C$$$ were replaced by letters from the Latin (or other) alphabet.
Moreover, three additional rules applied:
The solution to such riddles is any substitution "letter — digit" that transforms the expression into an identity.
For the given riddle of the described form, you need to:
The first line contains the string $$$SA$$$ $$$(1 \le |SA| \le 3)$$$ — the string corresponding to the number $$$A$$$ in the riddle.
The second line contains the string $$$SB$$$ $$$(1 \le |SB| \le 3)$$$ — the string corresponding to the number $$$B$$$ in the riddle.
The third line contains the string $$$SC$$$ $$$(1 \le |SC| \le 4)$$$ — the string corresponding to the number $$$C$$$ in the riddle.
It is guaranteed that the strings $$$SA$$$, $$$SB$$$, and $$$SC$$$ consist only of uppercase Latin alphabet letters.
In the first line, output an integer $$$R$$$ $$$(0 \le R \le 10^9)$$$ — the number of solutions to this riddle.
If $$$R \gt 0$$$, then in the next three lines output any of the solutions to the riddle:
ABCDEFAAAZ
72 123 987 1110
AAABBBCDC
0
PQSTPV
0
XYX
0
First test example
The riddle ABC + DEF = AAAZ can be solved, for example, as $$$123 + 987 = 1110$$$:
Examples of other possible solutions:
Second test example
The riddle AAA + BBB = CDC has no solutions, as in this case
Third test example
The riddle PQ + ST = PV has no solutions, as in this case the number represented by ST must have a leading zero, which is not allowed.
Fourth test example
The riddle X + Y = X has no solutions, as in this case the number represented by Y must equal zero, which is not allowed.
| Name |
|---|


