Time limit
2s
Memory limit
128 MB
An addition equation has the form A+B=C. The values A, B, and C are nonnegative integers. A number may not start with 0, unless the number has exactly one digit. Some digits in the equation are written as ?.
Restore the equation by replacing every ? with a digit so that the equation is true. If several restorations are possible, output one with the largest value of C. If there is still more than one, output one with the largest value of A.
The first line contains the equation. Its length is at most 50 characters.
Print the restored equation. If it is impossible, print -1.