Johnny keeps failing his math courses, so the department has placed him in a remedial course he must pass to stay enrolled. To impress the professor, he types every assignment on a computer. One assignment gave him several problems; in each he had to add a list of positive numbers and print the equation, for example 4+12+3=19.
Unfortunately a printer bug dropped every plus sign, so that line was printed as 4123=19. Your task is to put the plus signs back.
Each line you must repair is a run of digits, an equals sign, and the correct sum. When restoring the equation you may rely on three facts about the original numbers: every number was a positive integer, no number other than the sum had more than 5 digits, and no number had a leading zero.
The input contains one or more expressions, one per line. Each line has the form digits=sum: digits is the run of digits left after the plus signs were removed, and sum is the required total. No line is longer than 256 characters. The input ends with the line 0=0, which is a sentinel and must not be processed.
For each expression, in the order given, print a line k. result, where k is the expression number starting from 1, the period is followed by a single space, and result is defined below.
Insert plus signs into digits so that the resulting addends are positive integers, each with at most 5 digits and no leading zero, whose total equals sum; result is then the fully restored equation digits=sum (with the plus signs in place). Use as few plus signs as possible. If several restorations achieve that same minimum number of plus signs, output the lexicographically smallest such equation string — because + compares as less than every digit, this is the restoration whose plus signs sit as far to the left as possible. If no valid restoration exists, print IMPOSSIBLE as the result instead.