import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')


N = int(input())

import collections
d = collections.defaultdict(int)

for _ in range(N):
    S = input()
    d[S] += 1

c = collections.Counter(d)
cnt = c.most_common()[0][-1]

a = []
for k, v in collections.Counter(d).most_common():
    if v != cnt:
        break
    a.append(k)

a.sort()
print(*a, sep="\n") import sys sys readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 INF = float('inf') INF float('inf') float 'inf' N = int(input()) N int(input()) int input() input import collections collections d = collections.defaultdict(int) d collections.defaultdict(int) collections.defaultdict collections defaultdict int for _ in range(N):
    S = input()
    d[S] += 1 _ range(N) range N S = input() S input() input d[S] += 1 d[S] d S 1 c = collections.Counter(d) c collections.Counter(d) collections.Counter collections Counter d cnt = c.most_common()[0][-1] cnt c.most_common()[0][-1] [0] c.most_common() c.most_common c most_common 0 -1 a = [] a [] for k, v in collections.Counter(d).most_common():
    if v != cnt:
        break
    a.append(k) k v collections.Counter(d).most_common() collections.Counter(d).most_common collections.Counter(d) collections.Counter collections Counter d most_common if v != cnt:
        break
     v != cnt v cnt break a.append(k) a.append a append k a.sort() a.sort a sort print(*a, sep="\n") print *a a sep="\n" sep "\n" INF = float('inf') float('inf') INF readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines a = [] [] a cnt = c.most_common()[0][-1] c.most_common()[0][-1] cnt N = int(input()) int(input()) N S = input() input() S read = sys.stdin.buffer.read sys.stdin.buffer.read read c = collections.Counter(d) collections.Counter(d) c d = collections.defaultdict(int) collections.defaultdict(int) d readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')


N = int(input())

import collections
d = collections.defaultdict(int)

for _ in range(N):
    S = input()
    d[S] += 1

c = collections.Counter(d)
cnt = c.most_common()[0][-1]

a = []
for k, v in collections.Counter(d).most_common():
    if v != cnt:
        break
    a.append(k)

a.sort()
print(*a, sep="\n")