N = int(input())

d = {}
ans = []

for i in range(N):
    S = input()
    d.setdefault(S,0)
    d[S] += 1

max = max(d.values())
for key in d.keys():
    if d[key] == max:
        ans.append(key)
        
ans = sorted(ans)

for word in ans:
    print(word) N = int(input()) N int(input()) int input() input d = {} d {} ans = [] ans [] for i in range(N):
    S = input()
    d.setdefault(S,0)
    d[S] += 1 i range(N) range N S = input() S input() input d.setdefault(S,0) d.setdefault d setdefault S 0 d[S] += 1 d[S] d S 1 max = max(d.values()) max max(d.values()) max d.values() d.values d values for key in d.keys():
    if d[key] == max:
        ans.append(key)
         key d.keys() d.keys d keys if d[key] == max:
        ans.append(key)
         d[key] == max d[key] d key max ans.append(key) ans.append ans append key ans = sorted(ans) ans sorted(ans) sorted ans for word in ans:
    print(word) word ans print(word) print word N = int(input()) int(input()) N S = input() input() S max = max(d.values()) max(d.values()) max d = {} {} d ans = [] [] ans ans = sorted(ans) sorted(ans) ans
N = int(input())

d = {}
ans = []

for i in range(N):
    S = input()
    d.setdefault(S,0)
    d[S] += 1

max = max(d.values())
for key in d.keys():
    if d[key] == max:
        ans.append(key)
        
ans = sorted(ans)

for word in ans:
    print(word)