## VUDAAB - Progression

no tags

There are two very famous progressions, arithmetic progressions and geometric progressions. These progressions are a set of numbers that have a steady increase along the progression. Arithmetic progressions have a constant difference between all the numbers. Eg: 3, 5, 7, 9, 11, 13 is an arithmetic progression with difference 2. Geometric progressions have in common ratio. Eg: 2, 6, 18, 54 is a geometric progression with a ratio of 3. Given 3 numbers your task is to find the fourth number of the progression, which can be either geometric or arithmetic.

### Input

The first line will have a number 't'(1 <= t <= 100) the number of test cases, below are t lines each with three integers 'a', 'b', 'c' (-10000 <= a, b, c <= 10000, a != b, b != c) that are part of the progression of each case.

### Output

Print a number 'd' for each test case that is the number following the progression, it is guaranteed that the output will be an integer.

### Example

```Input:
3
2 4 6
-6 4 14
-4 4 -4

Output:
8
24
4

```