Time Limit: 1000 mSec Memory Limit : 32768 KB

Today the teacher give out a tedious homework to loy concerning the integer calculation practice. He is not contend with such boring homework, so instead, loy decides to write a program to help him finish the homework.

The expression is consists of only integers,+,-,*,/,( and ). The brackets is guaranteed to be exactly matched. And the operator / returns the integer part of the division, i.e. 7/2=3. It is guaranteed that the divisor is not zero.

The expression is consists of only integers,+,-,*,/,( and ). The brackets is guaranteed to be exactly matched. And the operator / returns the integer part of the division, i.e. 7/2=3. It is guaranteed that the divisor is not zero.

The first line of the input contains a single integer t, representing the number of testcase. The following t lines contains expressions one per line. There is no extra spaces in the expression. And the total length of the expression will not exceed 200.

For each case, output a integer representing the result of the expression.

2
1+3/2
1-(2+(3*(4/5)))

2
-1