N = int(input())
S = dict()
for i in range(N):
    s = input()
    if s in S:
        S[s] += 1
    else:
        S[s] = 1

max_val = max(S.values())
max_key = [key for key in S if S[key] == max_val]
print("\n".join(sorted(max_key))) N = int(input()) N int(input()) int input() input S = dict() S dict() dict for i in range(N):
    s = input()
    if s in S:
        S[s] += 1
    else:
        S[s] = 1 i range(N) range N s = input() s input() input if s in S:
        S[s] += 1
    else:
        S[s] = 1 s in S s S S[s] += 1 S[s] S s 1 S[s] = 1 S[s] S s 1 max_val = max(S.values()) max_val max(S.values()) max S.values() S.values S values key for key in S if S[key] == max_val for key in S if S[key] == max_val key S S[key] == max_val S[key] S key max_val if S[key] == max_val key max_key = [key for key in S if S[key] == max_val] max_key [key for key in S if S[key] == max_val] print("\n".join(sorted(max_key))) print "\n".join(sorted(max_key)) "\n".join "\n" join sorted(max_key) sorted max_key max_val = max(S.values()) max(S.values()) max_val N = int(input()) int(input()) N S = dict() dict() S s = input() input() s max_key = [key for key in S if S[key] == max_val] [key for key in S if S[key] == max_val] max_key
N = int(input())
S = dict()
for i in range(N):
    s = input()
    if s in S:
        S[s] += 1
    else:
        S[s] = 1

max_val = max(S.values())
max_key = [key for key in S if S[key] == max_val]
print("\n".join(sorted(max_key)))
