n=int(input())
s=[]
for i in range(n):
    s.append(input())
s.sort()
t=1
m=0
a=s[0]
for i in range(n-1):
    if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        m=max(t,m)
        t=1
m=max(t,m)
t=1
x=[]
a=s[0]
for i in range(n-1):
    if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        if t==m:
            x.append(s[i])
        t=1
if  t==m:
    x.append(s[len(s)-1])
for i in range(len(x)):
    print(x[i]) n=int(input()) n int(input()) int input() input s=[] s [] for i in range(n):
    s.append(input()) i range(n) range n s.append(input()) s.append s append input() input s.sort() s.sort s sort t=1 t 1 m=0 m 0 a=s[0] a s[0] s 0 for i in range(n-1):
    if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        m=max(t,m)
        t=1 i range(n-1) range n-1 n 1 if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        m=max(t,m)
        t=1 s[i+1]==a s[i+1] s i+1 i 1 a t+=1 t 1 a=s[i+1] a s[i+1] s i+1 i 1 m=max(t,m) m max(t,m) max t m t=1 t 1 m=max(t,m) m max(t,m) max t m t=1 t 1 x=[] x [] a=s[0] a s[0] s 0 for i in range(n-1):
    if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        if t==m:
            x.append(s[i])
        t=1 i range(n-1) range n-1 n 1 if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        if t==m:
            x.append(s[i])
        t=1 s[i+1]==a s[i+1] s i+1 i 1 a t+=1 t 1 a=s[i+1] a s[i+1] s i+1 i 1 if t==m:
            x.append(s[i])
         t==m t m x.append(s[i]) x.append x append s[i] s i t=1 t 1 if  t==m:
    x.append(s[len(s)-1]) t==m t m x.append(s[len(s)-1]) x.append x append s[len(s)-1] s len(s)-1 len(s) len s 1 for i in range(len(x)):
    print(x[i]) i range(len(x)) range len(x) len x print(x[i]) print x[i] x i t+=1 1 t t=1 1 t t+=1 1 t x=[] [] x t=1 1 t m=max(t,m) max(t,m) m a=s[i+1] s[i+1] a a=s[i+1] s[i+1] a n=int(input()) int(input()) n m=max(t,m) max(t,m) m t=1 1 t t=1 1 t a=s[0] s[0] a s=[] [] s a=s[0] s[0] a m=0 0 m
n=int(input())
s=[]
for i in range(n):
    s.append(input())
s.sort()
t=1
m=0
a=s[0]
for i in range(n-1):
    if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        m=max(t,m)
        t=1
m=max(t,m)
t=1
x=[]
a=s[0]
for i in range(n-1):
    if s[i+1]==a:
        t+=1
    else:
        a=s[i+1]
        if t==m:
            x.append(s[i])
        t=1
if  t==m:
    x.append(s[len(s)-1])
for i in range(len(x)):
    print(x[i])