from collections import *
n=int(input())
l=[]
for i in range(n):
    l.append(input())
c=Counter(l)
m=max(c.values())
d=[]
for i in c:
    if(c[i]==m):
        d.append(i)
d.sort()
for i in d:
    print(i) from collections import * n=int(input()) n int(input()) int input() input l=[] l [] for i in range(n):
    l.append(input()) i range(n) range n l.append(input()) l.append l append input() input c=Counter(l) c Counter(l) Counter l m=max(c.values()) m max(c.values()) max c.values() c.values c values d=[] d [] for i in c:
    if(c[i]==m):
        d.append(i) i c if(c[i]==m):
        d.append(i) c[i]==m c[i] c i m d.append(i) d.append d append i d.sort() d.sort d sort for i in d:
    print(i) i d print(i) print i m=max(c.values()) max(c.values()) m d=[] [] d l=[] [] l n=int(input()) int(input()) n c=Counter(l) Counter(l) c
from collections import *
n=int(input())
l=[]
for i in range(n):
    l.append(input())
c=Counter(l)
m=max(c.values())
d=[]
for i in c:
    if(c[i]==m):
        d.append(i)
d.sort()
for i in d:
    print(i)
