N = int(input())
l = []
for i in range(N):
    l.append(input())
l.sort()
a = l[0]
k = [1]
n = [str(l[0])]
for i in range(1,N):
    if a == l[i]:
        k[-1] += 1
    else:
        a = l[i]
        k.append(1)
        n.append(l[i])
m = max(k)
ans = []
for i in range(len(k)):
    if k[i] == m:
        ans.append(n[i])

ans.sort()
for i in range(len(ans)):
    print(ans[i]) 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 l.sort() l.sort l sort a = l[0] a l[0] l 0 k = [1] k [1] 1 n = [str(l[0])] n [str(l[0])] str(l[0]) str l[0] l 0 for i in range(1,N):
    if a == l[i]:
        k[-1] += 1
    else:
        a = l[i]
        k.append(1)
        n.append(l[i]) i range(1,N) range 1 N if a == l[i]:
        k[-1] += 1
    else:
        a = l[i]
        k.append(1)
        n.append(l[i]) a == l[i] a l[i] l i k[-1] += 1 k[-1] k -1 1 a = l[i] a l[i] l i k.append(1) k.append k append 1 n.append(l[i]) n.append n append l[i] l i m = max(k) m max(k) max k ans = [] ans [] for i in range(len(k)):
    if k[i] == m:
        ans.append(n[i]) i range(len(k)) range len(k) len k if k[i] == m:
        ans.append(n[i]) k[i] == m k[i] k i m ans.append(n[i]) ans.append ans append n[i] n i ans.sort() ans.sort ans sort for i in range(len(ans)):
    print(ans[i]) i range(len(ans)) range len(ans) len ans print(ans[i]) print ans[i] ans i l = [] [] l a = l[0] l[0] a k = [1] [1] k ans = [] [] ans a = l[i] l[i] a N = int(input()) int(input()) N n = [str(l[0])] [str(l[0])] n m = max(k) max(k) m
N = int(input())
l = []
for i in range(N):
    l.append(input())
l.sort()
a = l[0]
k = [1]
n = [str(l[0])]
for i in range(1,N):
    if a == l[i]:
        k[-1] += 1
    else:
        a = l[i]
        k.append(1)
        n.append(l[i])
m = max(k)
ans = []
for i in range(len(k)):
    if k[i] == m:
        ans.append(n[i])

ans.sort()
for i in range(len(ans)):
    print(ans[i])