from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
m = c.most_common()[0][1]
k = list(c.keys())
v = list(c.values())

l = []
for i in range(len(c)):
  if v[i] == m:
    l.append(k[i])

l.sort()
    
print(*l,sep="\n") from collections import Counter 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)] c = Counter(s) c Counter(s) Counter s m = c.most_common()[0][1] m c.most_common()[0][1] [0] c.most_common() c.most_common c most_common 0 1 k = list(c.keys()) k list(c.keys()) list c.keys() c.keys c keys v = list(c.values()) v list(c.values()) list c.values() c.values c values l = [] l [] for i in range(len(c)):
  if v[i] == m:
    l.append(k[i]) i range(len(c)) range len(c) len c if v[i] == m:
    l.append(k[i]) v[i] == m v[i] v i m l.append(k[i]) l.append l append k[i] k i l.sort() l.sort l sort print(*l,sep="\n") print *l l sep="\n" sep "\n" n = int(input()) int(input()) n l = [] [] l c = Counter(s) Counter(s) c k = list(c.keys()) list(c.keys()) k m = c.most_common()[0][1] c.most_common()[0][1] m v = list(c.values()) list(c.values()) v s = [input() for _ in range(n)] [input() for _ in range(n)] s
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]

c = Counter(s)
m = c.most_common()[0][1]
k = list(c.keys())
v = list(c.values())

l = []
for i in range(len(c)):
  if v[i] == m:
    l.append(k[i])

l.sort()
    
print(*l,sep="\n")