#K3551. Election Winner
Election Winner
Election Winner
Your task is to determine the winner of an election. The input consists of several test cases. For each test case, you will be given a list of votes, where each vote is a string representing a candidate's name. The winner is defined as the candidate with the highest number of votes. In the event of a tie, output the lexicographically smallest candidate's name. Formally, if candidates \( c_1, c_2, \dots, c_n \) receive votes and the maximum vote count is \( M \), then the answer is \( \min\{ c_i \mid \text{votes}(c_i)=M \} \).
You are required to read input from stdin and output your result to stdout.
inputFormat
The first line contains an integer \( T \) denoting the number of test cases. For each test case, the first line contains a single integer \( N \) representing the number of votes. The next line contains \( N \) space-separated strings, each representing a vote for a candidate.
outputFormat
For each test case, output a single line containing the name of the winning candidate.
## sample4
3
alice bob alice
4
john john jack jack
4
alice bob carol dave
1
bob
alice
jack
alice
bob
</p>