Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Incorrect Is Incorrect

By mdvirus · Limits 500ms, 256 MB · Custom Checker

This is a straightforward problem. You will be given an incorrect mathematical sum expression like $A+B=C$. It has to be changed and printed so that it becomes a correct mathematical sum expression like $A'+B'=C'$. But the condition is, $A+B+C$ and $A'+B'+C'$ have to be equal.

Input

In the one-line input, the incorrect mathematical sum expression will be given.

Constraints:
$\bullet$ $0 \le A, B \lt C \le 10^8$

Output

In the one-line output, you have to print the changed expression according to the condition. If more than one correct expression occurs, you can print any of them. But if there is no expression according to the condition, then you have to print “Impossible” (without quotes). Take a look at the samples to know the details of the input/output format.

Samples

InputOutput
2+1=5
2+2=4

0+4=4, 4+0=4, 3+1=4, 1+3=4 expressions are also acceptable.

InputOutput
1+1=6
2+2=4
InputOutput
2+2=5
Impossible

In this case, no correct expression can be formed.


There should be no space before or after the ‘+’ or ‘=’ sign.

Discussion

Statistics


84% Solution Ratio

riyad000Earliest, 1w ago

riyad000Fastest, 0.0s

mdvirusLightest, 0 B

ShihabAhameddgShortest, 172B

Submit

Login to submit

Related Contests