Cards

Count the N card values and print the most frequent one, breaking ties by the smaller value.

Easy3Hash mapSortingInterviewNo attempts yetTime limit1sMemory limit256 MB

Problem

Jungyu has NN number cards. Each card has one integer written on it, and that integer is at least 262-2^{62} and at most 2622^{62}.

Given the cards Jungyu holds, write a program that finds the integer he holds the most copies of. If several integers are tied for the largest count, print the smallest of them.

Input

The first line contains the number of cards NN (1N100,0001 \le N \le 100{,}000). Each of the next NN lines contains one integer written on a card.

Output

Print the integer that Jungyu holds the most copies of.