Олимпиадный тренинг

Задача 38435. Excavations


During recent excavations on Mars, sheets of paper with mysterious symbols on them were discovered. After much research, scientists came to the conclusion that the inscriptions on them could actually be ordinary numerical equalities. If this conclusion turned out to be correct, it would prove not only that there were intelligent beings on Mars many years ago, but also that they already knew how to count…
Scientists were able to understand what the found symbols mean in this case, and translated these equalities into ordinary language — the language of numbers, brackets, arithmetic and equal signs. In addition, strong evidence was obtained from other sources that the Martians knew only three operations — addition, multiplication and subtraction (the Martians never used "unary minus": instead of "5" they wrote "0" 5). Scientists also proved that the Martians did not give operations different priorities, but simply calculated expressions (if there were no brackets in them) from left to right: for example, 3 + 3 * 5 was 30, not 18.
Unfortunately, for some reason, the Martians applied the symbols of arithmetic operations with special ink, which, as it turned out, was not very resistant, and therefore there were spaces between the numbers instead of the action signs in the sheets found. If all of the above theory is correct, then instead of these spaces, signs of addition, subtraction and multiplication can be put so that the equalities become true. For example, if a sheet of paper with the inscription “18=7 (5 3) 2” was found, then the following arrangement of characters is possible: “18=7+(5–3)*2” (remember the order in which Martians evaluate expressions!). At the same time, if a sheet with the inscription “5=3 3” came across, then the Martians clearly did not mean numerical equality when they wrote it…
You must write a program that finds the required character set or reports that it doesn't exist.

Input data format
The first line of the input file consists of a natural (positive integer) number not exceeding 230, an equal sign, and a sequence of natural numbers (not more than ten), the product of which also does not exceed 230. Some groups of numbers (one or more) may be surrounded by brackets. The length of the input string will not exceed 80 characters, and there are no other restrictions on the number and nesting of parentheses. There will always be at least one space between two adjacent numbers not separated by brackets, in all other places there can be any number of spaces (including 0) (of course, there are no spaces inside the number).

Output data format
It is necessary to output one line containing the obtained equality (ie, the original equality with inserted arithmetic operation signs) into the output file. If the required character arrangement is not possible, output a string consisting of the single number “–1”. The output string must not contain spaces.
 
Examples
# Input Output
1 18=7 (5 3) 2 18=7+(5–3)*2
2   5= 3 3 -1