Contests | Virtual Contests | Problems | Submit | Runs Status | Rank List | Forum |

Time Limit: 1.0 Seconds Memory Limit: 65536K

Total Runs: 2524 Accepted Runs: 1485

Given a sequence which contains n elements, we can get its "Sub"-sequence by taking the difference between each pair of adjacent elements. For instance, the original sequence is a_{1}, a_{2}... a_{n}, and its "Sub"-sequence is b_{1}, b_{2}... b_{n-1}, where b_{i} = a_{i+1} - a_{i}.

Now we iteratively apply the above process several times until there is only one element in the sequence. Please write a program to calculate the last element left in the "Sub"-sequence.

**Input:**

There are several test cases in the input data. The first line contains the number of test cases. There are two lines in each test case. The first line contains a positive integer N (1 ≤ N ≤ 20) denoting the length of the original sequence. The second line contains a sequence of N elements separated by spaces. It is guaranteed that the absolute value of every element will not exceed 100.

**Output:**

Output the last element left in the "Sub"-sequence in one line for every test case.

**Sample input:**

2 4 1 2 3 4 5 12 -5 3 -100 8

**Sample output:**

0 458

Maintance:Fxz. Developer: SuperHacker, G.D.Retop, Fxz