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