Math Test
Sakurako is in the fifth grade and tomorrow has a Math test. He decided to prepare for the test and get the maximum score. The topic he is currently studying is the absolute values of numbers.
The absolute value of , denoted by , is defined as:
It isn't a difficult topic, and Sakurako easily solved almost all the tasks. However, there is a task with which he has difficulties. The statement is the following:
"Given integers . What is the value of if you replace it with exactly times?"
Sakurako thinks this problem is too generalized and asks you to give him the answer for some cases so that he can find the solution on his own. Please help Sakurako with the preparation for the Math test.
Input
The first line contains an integer — the number of cases Sakurako has given to you.
Each of the following lines contains three integers — Sakurako asks you to solve the task for this triple of integers.
Output
For each case, output a single integer — the value of after replacements.
Examples
Note
In the third case, we have . So we perform three replacements:
;
;
.
Hence, the answer for that case is .
Scoring
( points): ;
( points): for all cases;
( points): is divisible by for all cases;
( points): without additional restrictions.