n numbers are given. Find the mode of these numbers. The mode is defined as the number that appears most frequently. If there are multiple modes, output the smallest one.
The first line contains a natural number, n(1≤n≤105).
The second line contains n numbers separated by spaces.
The solution of the problem in a single line.
3 3 2 4
2
3 4 3 4
4
Login to be able to submit.