Geunwoo is ten years old and is learning the four basic arithmetic operations. Tired of grinding through pointless calculations by hand, he decided to write a program that reads an expression and prints its answer.
An expression is built only from single digits 0 to 9 and the operators +, -, *, /. Multiplication and division are computed before addition and subtraction, and operators of the same precedence are computed from left to right.
Geunwoo has not learned real numbers yet, so every division rounds down. Rounding goes toward negative infinity, so the answer to 4/3 is 1 and the answer to -7/2 is -4.
He is young, so he sometimes mistypes an expression. Only the following form counts as a valid expression. One minus sign - may appear at the very front, then comes one digit, and after that a pair of one operator and one digit repeats zero or more times. A leading - is the sign of the first number.
An expression outside this form cannot be computed. An expression that contains a division by zero anywhere cannot be computed either.
The first line contains the number of test cases T. Each of the next T lines contains one expression with no spaces. An expression is built only from the digits 0 to 9 and the operators +, -, *, /, and its length is between 1 and 50.
For each test case, print the value of the expression on its own line. Print WRONG INPUT when the expression cannot be computed. Both the intermediate values and the final result stay within the range of a 64-bit signed integer.