N = int(input())
C = {}
for _ in range(N):
    s = input().strip()
    if s not in C:
        C[s]=0
    C[s] += 1
cmax = 0
for s in C:
    cmax = max(cmax,C[s])
A = []
for s in C:
    if C[s]==cmax:
        A.append(s)
A = sorted(A)
for i in range(len(A)):
    print(A[i]) N = int(input()) N int(input()) int input() input C = {} C {} for _ in range(N):
    s = input().strip()
    if s not in C:
        C[s]=0
    C[s] += 1 _ range(N) range N s = input().strip() s input().strip() ().strip () input strip if s not in C:
        C[s]=0
     s not in C s C C[s]=0 C[s] C s 0 C[s] += 1 C[s] C s 1 cmax = 0 cmax 0 for s in C:
    cmax = max(cmax,C[s]) s C cmax = max(cmax,C[s]) cmax max(cmax,C[s]) max cmax C[s] C s A = [] A [] for s in C:
    if C[s]==cmax:
        A.append(s) s C if C[s]==cmax:
        A.append(s) C[s]==cmax C[s] C s cmax A.append(s) A.append A append s A = sorted(A) A sorted(A) sorted A for i in range(len(A)):
    print(A[i]) i range(len(A)) range len(A) len A print(A[i]) print A[i] A i s = input().strip() input().strip() s A = [] [] A N = int(input()) int(input()) N A = sorted(A) sorted(A) A cmax = max(cmax,C[s]) max(cmax,C[s]) cmax C = {} {} C cmax = 0 0 cmax
N = int(input())
C = {}
for _ in range(N):
    s = input().strip()
    if s not in C:
        C[s]=0
    C[s] += 1
cmax = 0
for s in C:
    cmax = max(cmax,C[s])
A = []
for s in C:
    if C[s]==cmax:
        A.append(s)
A = sorted(A)
for i in range(len(A)):
    print(A[i])