from collections import Counter
n = int(input())
s = list(input() for i in range(n))
c = Counter(s)
m = max(c.values())
s = sorted(list(set(s)))
for i in range(len(s)):
    if c[s[i]] == m:
        print(s[i]) from collections import Counter 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 c = Counter(s) c Counter(s) Counter s m = max(c.values()) m 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]] == m:
        print(s[i]) i range(len(s)) range len(s) len s if c[s[i]] == m:
        print(s[i]) c[s[i]] == m c[s[i]] c s[i] s i m print(s[i]) print s[i] s i c = Counter(s) Counter(s) c s = sorted(list(set(s))) sorted(list(set(s))) s n = int(input()) int(input()) n s = list(input() for i in range(n)) list(input() for i in range(n)) s m = max(c.values()) max(c.values()) m
from collections import Counter
n = int(input())
s = list(input() for i in range(n))
c = Counter(s)
m = max(c.values())
s = sorted(list(set(s)))
for i in range(len(s)):
    if c[s[i]] == m:
        print(s[i])