#include<stdio.h>
int main()
{
int a,b,n;
char c;
while(scanf("%d",&n)!=EOF){
while(n){
n--;
scanf("%d%c%d",&a,&c,&b);
/*****字符用单引号,相对于1001,1002,这题完全没有难度**********/
if(c=='+')
printf("%d\n",a+b);
if(c=='-')
printf("%d\n",a-b);
if(c=='*')
printf("%d\n",a*b);
if(c=='/')
printf("%d\n",a/b);
}
}
return 0;
}
int main()
{
int a,b,n;
char c;
while(scanf("%d",&n)!=EOF){
while(n){
n--;
scanf("%d%c%d",&a,&c,&b);
/*****字符用单引号,相对于1001,1002,这题完全没有难度**********/
if(c=='+')
printf("%d\n",a+b);
if(c=='-')
printf("%d\n",a-b);
if(c=='*')
printf("%d\n",a*b);
if(c=='/')
printf("%d\n",a/b);
}
}
return 0;
}