n = int(input())
s = [input() for _ in range(n)]
ans = []
d = {}
for i in s:
    try: d[i] += 1
    except KeyError: d[i] = 1
mx = 0
for value in d.values():
    if value > mx: mx = value
for key, value in d.items():
    if value == mx:
        ans.append(key)
for v in sorted(ans):
    print(v) n = int(input()) n int(input()) int input() input input() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) input() input s = [input() for _ in range(n)] s [input() for _ in range(n)] ans = [] ans [] d = {} d {} for i in s:
    try: d[i] += 1
    except KeyError: d[i] = 1 i s try: d[i] += 1
    except KeyError: d[i] = 1 except KeyError: d[i] mx = 0 mx 0 for value in d.values():
    if value > mx: mx = value value d.values() d.values d values if value > mx: mx = v value > mx value mx for key, value in d.items():
    if value == mx:
        ans.append(key) key value d.items() d.items d items if value == mx:
        ans.append(key) value == mx value mx ans.append(key) ans.append ans append key for v in sorted(ans):
    print(v) v sorted(ans) sorted ans print(v) print v d = {} {} d s = [input() for _ in range(n)] [input() for _ in range(n)] s n = int(input()) int(input()) n ans = [] [] ans mx = 0 0 mx
n = int(input())
s = [input() for _ in range(n)]
ans = []
d = {}
for i in s:
    try: d[i] += 1
    except KeyError: d[i] = 1
mx = 0
for value in d.values():
    if value > mx: mx = value
for key, value in d.items():
    if value == mx:
        ans.append(key)
for v in sorted(ans):
    print(v)
