Majority#8173

Majority

1 second
128 megabytes
Very easy

The votes are in! Mathematicians world-wide have been polled, and each has chosen their favorite number between and . Your goal is to tally the votes and determine what the most popular number is.

If there is a tie for the greatest number of votes, choose the smallest number with that many votes.

Input

Starts with a single line containing the number of test cases, between and inclusive. For each test case, there will be a single line giving the number of votes (1 \leq V \leq 1000). Following that line will be lines, each with a single integer vote between and .

Output

For each test case print in a separate line the most popular number. In the case of a tie print the smallest number with that number of votes.

Examples

Example 1

Loading
Loading