D. Cowardly Lizard V
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output
This is the second problem in the formal contest featuring the "Cowardly Lizard" background.
— susenyang, Legend of Kangaroo Splay

Due to General Kangaroo's collapse while enhancing his combat abilities, he had to transform into the Cowardly Lizard.

General Kangaroo can choose to hide in one of the caves numbered $$$1$$$, $$$2$$$, $$$\dots$$$, $$$n$$$, while Kangaroo Splay will conduct $$$n$$$ probes on these $$$n$$$ caves. Fortunately, General Kangaroo knows the order in which Kangaroo Splay will probe the caves, so he can make a reasonable choice of hiding place to avoid detection.

For some reason, once General Kangaroo has chosen a hiding cave, he cannot change it. Please provide a cave number such that General Kangaroo can avoid all probes from Kangaroo Splay. If there are multiple feasible caves, output any one of them; if no such cave exists, output -1.

Formally, given a sequence of length $$$n$$$ denoted as $$$a_1, a_2, \dots, a_n$$$, you need to provide an $$$x(1\leq x \leq n)$$$ such that there is no $$$1 \leq i \leq n$$$ with $$$a_i = x$$$.

Input

The input consists of multiple test cases.

First, an integer $$$T(1 \leq T \leq 1000)$$$ is given, indicating the number of test cases.

For each test case, first input an integer $$$n(1 \leq n \leq 2 \times 10^5)$$$, representing the number of caves and the number of probes by Kangaroo Splay.

Next, input a line with $$$n$$$ integers $$$a_1, a_2, \dots, a_n(1 \leq a_i \leq n)$$$, representing the cave numbers that Kangaroo Splay will probe next.

It is guaranteed that for all data in a test case, the sum of $$$n$$$ does not exceed $$$2 \times 10^5$$$.

Output

Output a total of $$$T$$$ lines.

For each test case, if a feasible cave exists, output any one feasible cave number; if no such cave exists, output -1.

Example
Input
3
3
1 1 2
5
1 4 3 1 3
2
1 2
Output
3
5
-1