from collections import Counter
n = int(input())
s = [input() for i in range(n)]
num = Counter(s)
mx = max(num.values())
T = []
for n in sorted(num):
    if num[n] == mx:
        print(n) from collections import Counter 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 s = [input() for i in range(n)] s [input() for i in range(n)] num = Counter(s) num Counter(s) Counter s mx = max(num.values()) mx max(num.values()) max num.values() num.values num values T = [] T [] for n in sorted(num):
    if num[n] == mx:
        print(n) n sorted(num) sorted num if num[n] == mx:
        print(n) num[n] == mx num[n] num n mx print(n) print n s = [input() for i in range(n)] [input() for i in range(n)] s n = int(input()) int(input()) n T = [] [] T num = Counter(s) Counter(s) num mx = max(num.values()) max(num.values()) mx
from collections import Counter
n = int(input())
s = [input() for i in range(n)]
num = Counter(s)
mx = max(num.values())
T = []
for n in sorted(num):
    if num[n] == mx:
        print(n)