SOLVE
LATER
Today Tony Stark is upset with Jarvis, as it blew the whole plan of him defeating the Flash in parallel universe by showing him two images of Flash. Tony couldn't identify the real one and ended up getting hit hard. Jarvis is upset too and he wants to prove that it was not his mistake. Help Jarvis to prove himself faithful and true AI.
To prove, that Jarvis is not at fault, he is given N non-negative integers and he has to identify a lone integer among them. A lone integer is defined as an integer in the given array of integers that is left alone after pairing each of the other integers. Two integers can be paired if they have same value in decimal number system and have different indices in the array. (Look at example case for better understanding and it is guaranteed that there is at most one such integer.)
NOTE: An integer can't be paired with itself and once paired it can't be used to pair with other integers. (There are spaces after each input.)
INPUT:
First line will contain T, number of times Jarvis tests itself. For each test there will be two lines. First line of each test will contain number of integers N he takes, and next line will have N non-negative integers.
OUTPUT:
For each test output one lone integer or -1 if it doesn't exist.
CONSTRAINTS:
$$1 <= T <= 500$$
$$1 <= N <= 10^5$$
$$1 <= A_i <= 10^{12}$$
$$1.$$ In the first test, 8, 7 and 6 can be paired with respected same valued decimal integers, while 1 is left alone.
$$2.$$ In the second test, 5 can be paired with other 5 hence there is no lonely integer. So, the output will be $$-1$$.