def add(a,b): return a+b; n=int(input()) s=[] for i in range(n): x=str(input()) s.append(x) for i in s: print (eval(i))