from collections import Counter
n = int(input())
s = Counter([input() for i in range(n)])
max_s = max(s.values()) 
print(*sorted(k for k, v in s.items() if v == max_s), sep='\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 = Counter([input() for i in range(n)]) s Counter([input() for i in range(n)]) Counter [input() for i in range(n)] max_s = max(s.values()) max_s max(s.values()) max s.values() s.values s values print(*sorted(k for k, v in s.items() if v == max_s), sep='\n') print *sorted(k for k, v in s.items() if v == max_s) sorted(k for k, v in s.items() if v == max_s) sorted k sep='\n' sep '\n' max_s = max(s.values()) max(s.values()) max_s s = Counter([input() for i in range(n)]) Counter([input() for i in range(n)]) s n = int(input()) int(input()) n
from collections import Counter
n = int(input())
s = Counter([input() for i in range(n)])
max_s = max(s.values()) 
print(*sorted(k for k, v in s.items() if v == max_s), sep='\n')