A + B?#314

A + B?

0,25 წამი
64 მეგაბაიტი
ძალიან მარტივი

Petryk has been given the same homework assignment again: to find the sum of two natural numbers and . However, since Petryk is an enthusiastic fisherman who wanted to get to the evening catch, he copied the assignment in a hurry and always made the same mistake: sometimes, instead of the addition sign "+", he wrote the subtraction sign "-". In the evening, after fishing, he sat down to do his homework and began to solve all the problems exactly as they were written in his notebook.

Can you solve this assignment?

შემავალი მონაცემები

The first line contains the number of examples . The next lines follow the format A+B, where and are two given natural numbers. Between them, without spaces, there is either the sign for addition "+" or the sign for subtraction "-".

The format of the input is guaranteed (see the sample input). The numbers in the inputs do not exceed 10^{500}. 0 < N \leq 800.

გამომავალი მონაცემები

Output the resulting answer for each example on lines.

მაგალითები

მაგალითი 1

Loading
Loading