n=(int)(input())
a = sorted(list(input() for i in range(n)))
lis = sorted(list(set(a)))
big = [0 for i in range(len(lis))]
maxi = 0
counter = 1
check = 0
#print(a)
for i in range(len(a) - 1):
  #print(a[i])
  if a[i] == a[i + 1]:
    counter += 1
  else:
    big[check] = counter
    counter = 1
    check += 1
else:
  big[-1] = counter
maxi = max(big)
#print(lis, big)
for i in range(len(lis)):
  if big[i] == maxi:
    print(lis[i]) n=(int)(input()) n (int)(input()) int input() input a = sorted(list(input() for i in range(n))) a sorted(list(input() for i in range(n))) sorted list(input() for i in range(n)) list input() input lis = sorted(list(set(a))) lis sorted(list(set(a))) sorted list(set(a)) list set(a) set a 0 for i in range(len(lis)) for i in range(len(lis)) i range(len(lis)) range len(lis) len lis for i in range(len(lis)) 0 big = [0 for i in range(len(lis))] big [0 for i in range(len(lis))] maxi = 0 maxi 0 counter = 1 counter 1 check = 0 check 0 for i in range(len(a) - 1):
  #print(a[i])
  if a[i] == a[i + 1]:
    counter += 1
  else:
    big[check] = counter
    counter = 1
    check += 1
else:
  big[-1] = counter i range(len(a) - 1) range len(a) - 1 len(a) len a 1 if a[i] == a[i + 1]:
    counter += 1
  else:
    big[check] = counter
    counter = 1
    check += 1 a[i] == a[i + 1] a[i] a i a[i + 1] a i + 1 i 1 counter += 1 counter 1 big[check] = counter big[check] big check counter counter = 1 counter 1 check += 1 check 1 big[-1] = counter big[-1] big -1 counter maxi = max(big) maxi max(big) max big for i in range(len(lis)):
  if big[i] == maxi:
    print(lis[i]) i range(len(lis)) range len(lis) len lis if big[i] == maxi:
    print(lis[i]) big[i] == maxi big[i] big i maxi print(lis[i]) print lis[i] lis i check = 0 0 check n=(int)(input()) (int)(input()) n maxi = 0 0 maxi counter = 1 1 counter counter += 1 1 counter counter = 1 1 counter check += 1 1 check a = sorted(list(input() for i in range(n))) sorted(list(input() for i in range(n))) a maxi = max(big) max(big) maxi lis = sorted(list(set(a))) sorted(list(set(a))) lis big = [0 for i in range(len(lis))] [0 for i in range(len(lis))] big
n=(int)(input())
a = sorted(list(input() for i in range(n)))
lis = sorted(list(set(a)))
big = [0 for i in range(len(lis))]
maxi = 0
counter = 1
check = 0
#print(a)
for i in range(len(a) - 1):
  #print(a[i])
  if a[i] == a[i + 1]:
    counter += 1
  else:
    big[check] = counter
    counter = 1
    check += 1
else:
  big[-1] = counter
maxi = max(big)
#print(lis, big)
for i in range(len(lis)):
  if big[i] == maxi:
    print(lis[i])