N = int(input())
S = [input() for _ in range(N)]
S.sort()

res = 0
cnt = 1
for i in range(N-1):
    if S[i] == S[i+1]:
        cnt+=1
    else:
        res = max(res,cnt)
        cnt = 1

res = max(res,cnt)

cnt = 1
ans = []
for i in range(N-1):
    if S[i] == S[i+1]:
        cnt+=1
    else:
        if res == cnt:
            ans.append(S[i])
        cnt = 1

if cnt == res:
    ans.append(S[i+1])

for i in range(len(ans)):
    print(ans[i]) 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)] S.sort() S.sort S sort res = 0 res 0 cnt = 1 cnt 1 for i in range(N-1):
    if S[i] == S[i+1]:
        cnt+=1
    else:
        res = max(res,cnt)
        cnt = 1 i range(N-1) range N-1 N 1 if S[i] == S[i+1]:
        cnt+=1
    else:
        res = max(res,cnt)
        cnt = 1 S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 cnt+=1 cnt 1 res = max(res,cnt) res max(res,cnt) max res cnt cnt = 1 cnt 1 res = max(res,cnt) res max(res,cnt) max res cnt cnt = 1 cnt 1 ans = [] ans [] for i in range(N-1):
    if S[i] == S[i+1]:
        cnt+=1
    else:
        if res == cnt:
            ans.append(S[i])
        cnt = 1 i range(N-1) range N-1 N 1 if S[i] == S[i+1]:
        cnt+=1
    else:
        if res == cnt:
            ans.append(S[i])
        cnt = 1 S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 cnt+=1 cnt 1 if res == cnt:
            ans.append(S[i])
         res == cnt res cnt ans.append(S[i]) ans.append ans append S[i] S i cnt = 1 cnt 1 if cnt == res:
    ans.append(S[i+1]) cnt == res cnt res ans.append(S[i+1]) ans.append ans append S[i+1] S i+1 i 1 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 cnt = 1 1 cnt res = max(res,cnt) max(res,cnt) res cnt = 1 1 cnt cnt+=1 1 cnt cnt+=1 1 cnt cnt = 1 1 cnt res = max(res,cnt) max(res,cnt) res S = [input() for _ in range(N)] [input() for _ in range(N)] S res = 0 0 res cnt = 1 1 cnt N = int(input()) int(input()) N ans = [] [] ans
N = int(input())
S = [input() for _ in range(N)]
S.sort()

res = 0
cnt = 1
for i in range(N-1):
    if S[i] == S[i+1]:
        cnt+=1
    else:
        res = max(res,cnt)
        cnt = 1

res = max(res,cnt)

cnt = 1
ans = []
for i in range(N-1):
    if S[i] == S[i+1]:
        cnt+=1
    else:
        if res == cnt:
            ans.append(S[i])
        cnt = 1

if cnt == res:
    ans.append(S[i+1])

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