Given an integer n, build one expression whose value is n. The expression uses the digit 4 exactly four times, with exactly three binary operators chosen from *, +, -, / placed between them. The digit 4 is the only number you may use. Joining fours into a larger number such as 44 or 444 is not allowed.
Division is integer division that truncates toward zero, so 4 / 4 / 4 is 0 and not 0.25. Operators keep their usual precedence, so 4 + 4 * 4 is 20 and not 32.
Only 64 expressions fit these rules, so some values of n cannot be reached by any of them. For example, no expression gives n=11.
The first line contains the number of test cases m. (1≤m≤1000)
Each of the next m lines contains one integer n. (−1000000≤n≤1000000)
Print one line for each test case.
If an expression whose value is n exists, print it in the form 4 * 4 - 4 * 4 = 0, with a single space between every number, operator, and the equals sign. If no such expression exists, print no solution.
If several expressions have the value n, print only the one whose printed string comes first in lexicographic order. The four fours are identical, so this is the same as comparing the three operators from left to right under the order *, +, -, /.
There are three operator slots and four candidates for each slot, so only 64 expressions exist. Evaluate all 64 once and store, for each value, the expression that comes first in lexicographic order. Every test case then costs one table lookup.