n = int(input())
a = [input() for _ in range(n)]
cnt = {}
for i in range(n):
    if a[i] not in cnt:
        cnt[a[i]] = 1
    else:
        cnt[a[i]] += 1
mx = max(cnt.values())
ans = []
for i in cnt.keys():
    if cnt[i] == mx:
        ans.append(i)
ans.sort()
for _ in ans:
    print(_)


 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 a = [input() for _ in range(n)] a [input() for _ in range(n)] cnt = {} cnt {} for i in range(n):
    if a[i] not in cnt:
        cnt[a[i]] = 1
    else:
        cnt[a[i]] += 1 i range(n) range n if a[i] not in cnt:
        cnt[a[i]] = 1
    else:
        cnt[a[i]] += 1 a[i] not in cnt a[i] a i cnt cnt[a[i]] = 1 cnt[a[i]] cnt a[i] a i 1 cnt[a[i]] += 1 cnt[a[i]] cnt a[i] a i 1 mx = max(cnt.values()) mx max(cnt.values()) max cnt.values() cnt.values cnt values ans = [] ans [] for i in cnt.keys():
    if cnt[i] == mx:
        ans.append(i) i cnt.keys() cnt.keys cnt keys if cnt[i] == mx:
        ans.append(i) cnt[i] == mx cnt[i] cnt i mx ans.append(i) ans.append ans append i ans.sort() ans.sort ans sort for _ in ans:
    print(_) _ ans print(_) print _ mx = max(cnt.values()) max(cnt.values()) mx n = int(input()) int(input()) n a = [input() for _ in range(n)] [input() for _ in range(n)] a ans = [] [] ans cnt = {} {} cnt
n = int(input())
a = [input() for _ in range(n)]
cnt = {}
for i in range(n):
    if a[i] not in cnt:
        cnt[a[i]] = 1
    else:
        cnt[a[i]] += 1
mx = max(cnt.values())
ans = []
for i in cnt.keys():
    if cnt[i] == mx:
        ans.append(i)
ans.sort()
for _ in ans:
    print(_)



