import collections
n = int(input())
l = []
for i in range(n):
  l.append(input())
c = collections.Counter(l)
m = max(c.values())
chars = [key for key, value in c.items() if value == m]
chars.sort()
for s in chars:
  print(s) import collections collections n = int(input()) n int(input()) int input() input l = [] l [] for i in range(n):
  l.append(input()) i range(n) range n l.append(input()) l.append l append input() input c = collections.Counter(l) c collections.Counter(l) collections.Counter collections Counter l m = max(c.values()) m max(c.values()) max c.values() c.values c values key for key, value in c.items() if value == m for key, value in c.items() if value == m key value c.items() c.items c items value == m value m if value == m key chars = [key for key, value in c.items() if value == m] chars [key for key, value in c.items() if value == m] chars.sort() chars.sort chars sort for s in chars:
  print(s) s chars print(s) print s l = [] [] l c = collections.Counter(l) collections.Counter(l) c m = max(c.values()) max(c.values()) m n = int(input()) int(input()) n chars = [key for key, value in c.items() if value == m] [key for key, value in c.items() if value == m] chars
import collections
n = int(input())
l = []
for i in range(n):
  l.append(input())
c = collections.Counter(l)
m = max(c.values())
chars = [key for key, value in c.items() if value == m]
chars.sort()
for s in chars:
  print(s)