def add(a,b):
return a+b
def max(a,b):
if a>=b:
return a
else:
return b
def min(a,b):
if a>=b:
return b
else:
return a
list=[]
n=int(input())
while n>0:
n-=1
a=input()
list.append(eval(a))
for i in list:
print(i)