King Sam and King Shenoy are good friends. King Shenoy sent some numbers as codes to King Sam but did not give the key to the codes. Well, luckily, some sample codes have been cracked and are available to King Sam (shown in sample i/o). Help him crack the rest of the codes by figuring out the mysterious logic.
Input Format:
The First line contain the number of test cases T. Each test case contains two lines; the first line contains the number of elements n and the next line contains 'n' numbers (codes) in the form of an array.
Output Format:
Output T lines where the ith line contains a single integer, the decoded integer for the ith array.
Constraints:
1 <= T <=100
1 <= n <=1000
0 <= Elements Of Array <= 10^6
Eg:
input:
2
3
3 10 24
1
6
output:
1
6