L. Hello Hello zi and her caffeine problem
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

zi is feeling incredibly sleepy during a late-night coding round. To stay awake, she has lined up $$$n$$$ cups of coffee on her desk. The $$$i$$$-th cup has a specific caffeine level represented by an integer $$$a_i$$$.

She knows her limits: to fully wake up and solve problems, she must drink exactly three cups of coffee that have the exact same caffeine level.

Given the caffeine levels of all $$$n$$$ cups, help zi find a caffeine level that appears at least three times so she can wake up. If no such caffeine level exists, print $$$-1$$$ so she knows it's time to give up and just go to sleep.

Input

First line contains an integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.

The first line of each test case contains contains an integer $$$n$$$ ($$$1 \le n \le 2*10^5$$$) — the total number of coffee cups on the desk.

Second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le n$$$) — the caffeine levels of each coffee cup.

Output

For each test case, print any caffeine level that appears at least three times. If there is no such value, print $$$-1$$$.

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