Given a list of ~N~ integers, compute the one that appears most frequently.
If multiple integers are tied for most frequent, return the smallest such one.
~1 \le N \le 10~
~1 \le a_i \le 10~
The first line of the input consists of a single integer, ~N~.
The next line contains ~N~ space-separated integers. ~a_i~ represents the ~i~th integer in the list.
Output, on a single line, the smallest number that appears most frequently in the list.
4 1 1 2 2