import sys

input = sys.stdin.readline
d = {}
for _ in range(int(input())):
    s = input().replace("\n", "")
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

x = max(d.values())
l = sorted(s for (s, i) in d.items() if i == x)
print(*l, sep="\n") import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline d = {} d {} for _ in range(int(input())):
    s = input().replace("\n", "")
    if s in d:
        d[s] += 1
    else:
        d[s] = 1 _ range(int(input())) range int(input()) int input() input s = input().replace("\n", "") s input().replace("\n", "") ().replace () input replace "\n" "" if s in d:
        d[s] += 1
    else:
        d[s] = 1 s in d s d d[s] += 1 d[s] d s 1 d[s] = 1 d[s] d s 1 x = max(d.values()) x max(d.values()) max d.values() d.values d values l = sorted(s for (s, i) in d.items() if i == x) l sorted(s for (s, i) in d.items() if i == x) sorted s print(*l, sep="\n") print *l l sep="\n" sep "\n" x = max(d.values()) max(d.values()) x l = sorted(s for (s, i) in d.items() if i == x) sorted(s for (s, i) in d.items() if i == x) l input = sys.stdin.readline sys.stdin.readline input d = {} {} d s = input().replace("\n", "") input().replace("\n", "") s
import sys

input = sys.stdin.readline
d = {}
for _ in range(int(input())):
    s = input().replace("\n", "")
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

x = max(d.values())
l = sorted(s for (s, i) in d.items() if i == x)
print(*l, sep="\n")