from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
cntr = Counter(S)
mc = cntr.most_common()
n = mc[0][1]
ans = []
for k, v in mc:
    if n!=v:
        break
    ans.append(k)
ans.sort()
print("\n".join(ans)) from collections import Counter 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)] cntr = Counter(S) cntr Counter(S) Counter S mc = cntr.most_common() mc cntr.most_common() cntr.most_common cntr most_common n = mc[0][1] n mc[0][1] [0] mc 0 1 ans = [] ans [] for k, v in mc:
    if n!=v:
        break
    ans.append(k) k v mc if n!=v:
        break
     n!=v n v break ans.append(k) ans.append ans append k ans.sort() ans.sort ans sort print("\n".join(ans)) print "\n".join(ans) "\n".join "\n" join ans mc = cntr.most_common() cntr.most_common() mc N = int(input()) int(input()) N ans = [] [] ans S = [input() for _ in range(N)] [input() for _ in range(N)] S cntr = Counter(S) Counter(S) cntr n = mc[0][1] mc[0][1] n
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
cntr = Counter(S)
mc = cntr.most_common()
n = mc[0][1]
ans = []
for k, v in mc:
    if n!=v:
        break
    ans.append(k)
ans.sort()
print("\n".join(ans))
