def add(a,b): return a+b def mul(a,b): return a*b ncase=int(raw_input()) for i in range(ncase): s=raw_input() print eval(s)