from collections import Counter

N = int(input())
S = [input() for i in range(N)]

SC = Counter(S)
maxval = max(SC.values())
listmaxval = [key for key in SC if SC[key] == maxval]
listmaxval.sort()
ans = "\r\n".join(listmaxval)
print(ans) 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)] SC = Counter(S) SC Counter(S) Counter S maxval = max(SC.values()) maxval max(SC.values()) max SC.values() SC.values SC values key for key in SC if SC[key] == maxval for key in SC if SC[key] == maxval key SC SC[key] == maxval SC[key] SC key maxval if SC[key] == maxval key listmaxval = [key for key in SC if SC[key] == maxval] listmaxval [key for key in SC if SC[key] == maxval] listmaxval.sort() listmaxval.sort listmaxval sort ans = "\r\n".join(listmaxval) ans "\r\n".join(listmaxval) "\r\n".join "\r\n" join listmaxval print(ans) print ans N = int(input()) int(input()) N maxval = max(SC.values()) max(SC.values()) maxval SC = Counter(S) Counter(S) SC S = [input() for i in range(N)] [input() for i in range(N)] S ans = "\r\n".join(listmaxval) "\r\n".join(listmaxval) ans listmaxval = [key for key in SC if SC[key] == maxval] [key for key in SC if SC[key] == maxval] listmaxval
from collections import Counter

N = int(input())
S = [input() for i in range(N)]

SC = Counter(S)
maxval = max(SC.values())
listmaxval = [key for key in SC if SC[key] == maxval]
listmaxval.sort()
ans = "\r\n".join(listmaxval)
print(ans)