import collections

n = int(input())
s = list(input() for i in range(n))
s = sorted(s)
c = collections.Counter(s)
p = max(c.values())
s = sorted(list(set(s)))

for i in range(len(s)):
    if c[s[i]] == p:
        print(s[i]) import collections collections n = int(input()) n int(input()) int input() input s = list(input() for i in range(n)) s list(input() for i in range(n)) list input() input s = sorted(s) s sorted(s) sorted s c = collections.Counter(s) c collections.Counter(s) collections.Counter collections Counter s p = max(c.values()) p max(c.values()) max c.values() c.values c values s = sorted(list(set(s))) s sorted(list(set(s))) sorted list(set(s)) list set(s) set s for i in range(len(s)):
    if c[s[i]] == p:
        print(s[i]) i range(len(s)) range len(s) len s if c[s[i]] == p:
        print(s[i]) c[s[i]] == p c[s[i]] c s[i] s i p print(s[i]) print s[i] s i s = list(input() for i in range(n)) list(input() for i in range(n)) s c = collections.Counter(s) collections.Counter(s) c p = max(c.values()) max(c.values()) p n = int(input()) int(input()) n s = sorted(list(set(s))) sorted(list(set(s))) s s = sorted(s) sorted(s) s
import collections

n = int(input())
s = list(input() for i in range(n))
s = sorted(s)
c = collections.Counter(s)
p = max(c.values())
s = sorted(list(set(s)))

for i in range(len(s)):
    if c[s[i]] == p:
        print(s[i])