N = int(input())
dic, rst = {}, []
for i in range(N):
    S = input()
    if S in dic:
        dic[S] += 1
    else:
        dic[S] = 1
max_val = max(dic.values())
[ rst.append(key) for key, val in dic.items() if val == max_val ]
[ print(i) for i in sorted(rst) ] N = int(input()) N int(input()) int input() input dic, rst = {}, [] dic {} rst [] for i in range(N):
    S = input()
    if S in dic:
        dic[S] += 1
    else:
        dic[S] = 1 i range(N) range N S = input() S input() input if S in dic:
        dic[S] += 1
    else:
        dic[S] = 1 S in dic S dic dic[S] += 1 dic[S] dic S 1 dic[S] = 1 dic[S] dic S 1 max_val = max(dic.values()) max_val max(dic.values()) max dic.values() dic.values dic values rst.append(key) for key, val in dic.items() if val == max_val for key, val in dic.items() if val == max_val key val dic.items() dic.items dic items val == max_val val max_val if val == max_val rst.append(key) rst.append rst append key [ rst.append(key) for key, val in dic.items() if val == max_val ] print(i) for i in sorted(rst) for i in sorted(rst) i sorted(rst) sorted rst for i in sorted(rst) print(i) print i [ print(i) for i in sorted(rst) ] S = input() input() S rst = {}, [] [] rst max_val = max(dic.values()) max(dic.values()) max_val N = int(input()) int(input()) N dic, rst = {}, [] {} dic
N = int(input())
dic, rst = {}, []
for i in range(N):
    S = input()
    if S in dic:
        dic[S] += 1
    else:
        dic[S] = 1
max_val = max(dic.values())
[ rst.append(key) for key, val in dic.items() if val == max_val ]
[ print(i) for i in sorted(rst) ]