import collections
n = int(input())
ans = list(input() for i in range(n))
ans = collections.Counter(ans)
m = max(ans.values())
keys = [k for k, v in ans.items() if v == m]
[print(j) for j in sorted(keys)] import collections collections n = int(input()) n int(input()) int input() input ans = list(input() for i in range(n)) ans list(input() for i in range(n)) list input() input ans = collections.Counter(ans) ans collections.Counter(ans) collections.Counter collections Counter ans m = max(ans.values()) m max(ans.values()) max ans.values() ans.values ans values k for k, v in ans.items() if v == m for k, v in ans.items() if v == m k v ans.items() ans.items ans items v == m v m if v == m k keys = [k for k, v in ans.items() if v == m] keys [k for k, v in ans.items() if v == m] print(j) for j in sorted(keys) for j in sorted(keys) j sorted(keys) sorted keys for j in sorted(keys) print(j) print j [print(j) for j in sorted(keys)] n = int(input()) int(input()) n ans = list(input() for i in range(n)) list(input() for i in range(n)) ans ans = collections.Counter(ans) collections.Counter(ans) ans keys = [k for k, v in ans.items() if v == m] [k for k, v in ans.items() if v == m] keys m = max(ans.values()) max(ans.values()) m
import collections
n = int(input())
ans = list(input() for i in range(n))
ans = collections.Counter(ans)
m = max(ans.values())
keys = [k for k, v in ans.items() if v == m]
[print(j) for j in sorted(keys)]