import collections
N = int(input())
ls = []
for i in range(N):
    ls.append(input())

count = collections.Counter(ls)
maxval = max(count.values())
K = [k for k, v in count.items() if v == maxval]
L = sorted(K)
for i in L:
    print(i) import collections collections N = int(input()) N int(input()) int input() input ls = [] ls [] for i in range(N):
    ls.append(input()) i range(N) range N ls.append(input()) ls.append ls append input() input count = collections.Counter(ls) count collections.Counter(ls) collections.Counter collections Counter ls maxval = max(count.values()) maxval max(count.values()) max count.values() count.values count values k for k, v in count.items() if v == maxval for k, v in count.items() if v == maxval k v count.items() count.items count items v == maxval v maxval if v == maxval k K = [k for k, v in count.items() if v == maxval] K [k for k, v in count.items() if v == maxval] L = sorted(K) L sorted(K) sorted K for i in L:
    print(i) i L print(i) print i ls = [] [] ls N = int(input()) int(input()) N maxval = max(count.values()) max(count.values()) maxval count = collections.Counter(ls) collections.Counter(ls) count K = [k for k, v in count.items() if v == maxval] [k for k, v in count.items() if v == maxval] K L = sorted(K) sorted(K) L
import collections
N = int(input())
ls = []
for i in range(N):
    ls.append(input())

count = collections.Counter(ls)
maxval = max(count.values())
K = [k for k, v in count.items() if v == maxval]
L = sorted(K)
for i in L:
    print(i)