#!usr/bin/python #coding=utf-8 def add(x, y): return x + y n = int(raw_input()) for i in range(n): s = raw_input().strip() print eval(s)