Given a list of
If multiple integers are tied for most frequent, return the smallest such one.
Constraints
Input Specification
The first line of the input consists of a single integer,
The next line contains
Output Specification
Output, on a single line, the smallest number that appears most frequently in the list.
Sample Input
Copy
4
1 1 2 2
Sample Output
Copy
1
Comments