N = int(input())
S = {}
for i in range(N):
  tmp = input()
  if tmp in S:
    S[tmp] += 1
  else:
    S[tmp] = 0

l = list(S.items())
l.sort(key=lambda s: (-s[1], s[0]))
M = l[0][1]
print("\n".join([a[0] for a in list(filter(lambda b: b[1] == M, l))])) N = int(input()) N int(input()) int input() input S = {} S {} for i in range(N):
  tmp = input()
  if tmp in S:
    S[tmp] += 1
  else:
    S[tmp] = 0 i range(N) range N tmp = input() tmp input() input if tmp in S:
    S[tmp] += 1
  else:
    S[tmp] = 0 tmp in S tmp S S[tmp] += 1 S[tmp] S tmp 1 S[tmp] = 0 S[tmp] S tmp 0 l = list(S.items()) l list(S.items()) list S.items() S.items S items l.sort(key=lambda s: (-s[1], s[0])) l.sort l sort key=lambda s: (-s[1], s[0]) key lambda s: (-s[1], s[0]) (-s[1], s[0]) -s[1] s[1] s 1 s[0] s 0 s M = l[0][1] M l[0][1] [0] l 0 1 a[0] for a in list(filter(lambda b: b[1] == M, l)) for a in list(filter(lambda b: b[1] == M, l)) a list(filter(lambda b: b[1] == M, l)) list filter(lambda b: b[1] == M, l) filter lambda b: b[1] == M b[1] == M b[1] b 1 M b l for a in list(filter(lambda b: b[1] == M, l)) a[0] a 0 print("\n".join([a[0] for a in list(filter(lambda b: b[1] == M, l))])) print "\n".join([a[0] for a in list(filter(lambda b: b[1] == M, l))]) "\n".join "\n" join [a[0] for a in list(filter(lambda b: b[1] == M, l))] l = list(S.items()) list(S.items()) l N = int(input()) int(input()) N M = l[0][1] l[0][1] M tmp = input() input() tmp S = {} {} S
N = int(input())
S = {}
for i in range(N):
  tmp = input()
  if tmp in S:
    S[tmp] += 1
  else:
    S[tmp] = 0

l = list(S.items())
l.sort(key=lambda s: (-s[1], s[0]))
M = l[0][1]
print("\n".join([a[0] for a in list(filter(lambda b: b[1] == M, l))]))