import collections



n = int(eval(input()))

s = [eval(input()) for i in range(n)]



c = collections.Counter(s)

count = c.most_common()[0][1]



s2 = [i[0] for i in list(c.items()) if i[1] == count]

s2 = sorted(s2)



for i in range(len(s2)):

    print((s2[i]))
import sys



readline = sys.stdin.readline

MOD = 10 ** 9 + 7

INF = float('INF')

sys.setrecursionlimit(10 ** 5)





def main():

    from collections import Counter



    N = int(readline())

    c = Counter()



    for _ in range(N):

        s = eval(input())

        c[s] += 1



    _, cnt = c.most_common(1)[0]



    res = []

    for key, val in list(c.items()):

        if val == cnt:

            res.append(key)



    res.sort()



    for x in res:

        print(x)





if __name__ == '__main__':

    main()

import collections

n = int(eval(input()))
s = [eval(input()) for i in range(n)]
c = collections.Counter(s)
count = c.most_common()[0][1]
s2 = [i[0] for i in list(c.items()) if i[1] == count]
s2 = sorted(s2)
for i in range(len(s2)):
    print((s2[i]))

import sys

readline = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)


def main():
    from collections import Counter

    N = int(readline())
    c = Counter()
    for _ in range(N):
        s = eval(input())
        c[s] += 1
    _, cnt = c.most_common(1)[0]
    res = []
    for key, val in list(c.items()):
        if val == cnt:
            res.append(key)
    res.sort()
    for x in res:
        print(x)


if __name__ == "__main__":
    main()

-import collections +import sys -n = int(eval(input())) -s = [eval(input()) for i in range(n)] -c = collections.Counter(s) -count = c.most_common()[0][1] -s2 = [i[0] for i in list(c.items()) if i[1] == count] -s2 = sorted(s2) -for i in range(len(s2)): -    print((s2[i])) +readline = sys.stdin.readline +MOD = 10**9 + 7 +INF = float("INF") +sys.setrecursionlimit(10**5) + + +def main(): +    from collections import Counter + +    N = int(readline()) +    c = Counter() +    for _ in range(N): +        s = eval(input()) +        c[s] += 1 +    _, cnt = c.most_common(1)[0] +    res = [] +    for key, val in list(c.items()): +        if val == cnt: +            res.append(key) +    res.sort() +    for x in res: +        print(x) + + +if __name__ == "__main__": +    main()