from collections import Counter
n = int(input())
s = Counter([input() for _ in range(n)])
before = 0
ans = []
s = s.most_common()
for i in range(len(s)):
    if before == 0: before = s[i][1]
    elif before != s[i][1]: break
    ans.append(s[i][0])
for i in sorted(ans): print(i) 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 = Counter([input() for _ in range(n)]) s Counter([input() for _ in range(n)]) Counter [input() for _ in range(n)] before = 0 before 0 ans = [] ans [] s = s.most_common() s s.most_common() s.most_common s most_common for i in range(len(s)):
    if before == 0: before = s[i][1]
    elif before != s[i][1]: break
    ans.append(s[i][0]) i range(len(s)) range len(s) len s if before == 0: before = s[i][1]
    elif before != s[i][1]: break
     before == 0 before 0 elif before != s[i][1]: break
     before != s[i][1] before s[i][1] [i] s i 1 ans.append(s[i][0]) ans.append ans append s[i][0] [i] s i 0 for i in sorted(ans): print(i) i sorted(ans) sorted ans s = s.most_common() s.most_common() s ans = [] [] ans before = 0 0 before s = Counter([input() for _ in range(n)]) Counter([input() for _ in range(n)]) s n = int(input()) int(input()) n
from collections import Counter
n = int(input())
s = Counter([input() for _ in range(n)])
before = 0
ans = []
s = s.most_common()
for i in range(len(s)):
    if before == 0: before = s[i][1]
    elif before != s[i][1]: break
    ans.append(s[i][0])
for i in sorted(ans): print(i)