import sys
from collections import defaultdict

N = int(sys.stdin.readline().rstrip())

d = defaultdict(int)

for _ in range(N):
    s = sys.stdin.readline().rstrip()
    d[s] += 1

# print(d)
d2 = sorted([(v, k) for k, v in d.items()])
m = max(d2)[0]  # v の回数で max を拾う
# print(m)
for v, k in d2:
    if v == m:
        print(k) import sys sys from collections import defaultdict N = int(sys.stdin.readline().rstrip()) N int(sys.stdin.readline().rstrip()) int sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip d = defaultdict(int) d defaultdict(int) defaultdict int for _ in range(N):
    s = sys.stdin.readline().rstrip()
    d[s] += 1

# print(d) _ range(N) range N s = sys.stdin.readline().rstrip() s sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip d[s] += 1 d[s] d s 1 (v, k) for k, v in d.items() for k, v in d.items() k v d.items() d.items d items for k, v in d.items() (v, k) v k d2 = sorted([(v, k) for k, v in d.items()]) d2 sorted([(v, k) for k, v in d.items()]) sorted [(v, k) for k, v in d.items()] m = max(d2)[0] m max(d2)[0] (d2) max d2 0 for v, k in d2:
    if v == m:
        print(k) v k d2 if v == m:
        print(k) v == m v m print(k) print k N = int(sys.stdin.readline().rstrip()) int(sys.stdin.readline().rstrip()) N d2 = sorted([(v, k) for k, v in d.items()]) sorted([(v, k) for k, v in d.items()]) d2 s = sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() s d = defaultdict(int) defaultdict(int) d m = max(d2)[0] max(d2)[0] m
import sys
from collections import defaultdict

N = int(sys.stdin.readline().rstrip())

d = defaultdict(int)

for _ in range(N):
    s = sys.stdin.readline().rstrip()
    d[s] += 1

# print(d)
d2 = sorted([(v, k) for k, v in d.items()])
m = max(d2)[0]  # v の回数で max を拾う
# print(m)
for v, k in d2:
    if v == m:
        print(k)
