import collections

N = int(input())
L = [input() for i in range(N)]
c = collections.Counter(L)

max_L = max(list(c.values()))

keys = [k for k, v in c.items() if v == max_L]
keys.sort()

for key in keys:
    print(key) import collections collections N = int(input()) N int(input()) int input() input input() for i in range(N) for i in range(N) i range(N) range N for i in range(N) input() input L = [input() for i in range(N)] L [input() for i in range(N)] c = collections.Counter(L) c collections.Counter(L) collections.Counter collections Counter L max_L = max(list(c.values())) max_L max(list(c.values())) max list(c.values()) list c.values() c.values c values k for k, v in c.items() if v == max_L for k, v in c.items() if v == max_L k v c.items() c.items c items v == max_L v max_L if v == max_L k keys = [k for k, v in c.items() if v == max_L] keys [k for k, v in c.items() if v == max_L] keys.sort() keys.sort keys sort for key in keys:
    print(key) key keys print(key) print key keys = [k for k, v in c.items() if v == max_L] [k for k, v in c.items() if v == max_L] keys L = [input() for i in range(N)] [input() for i in range(N)] L N = int(input()) int(input()) N c = collections.Counter(L) collections.Counter(L) c max_L = max(list(c.values())) max(list(c.values())) max_L
import collections

N = int(input())
L = [input() for i in range(N)]
c = collections.Counter(L)

max_L = max(list(c.values()))

keys = [k for k, v in c.items() if v == max_L]
keys.sort()

for key in keys:
    print(key)
