from collections import defaultdict n = int(input()) C = defaultdict(int) for _ in range(n): s = input() C[len(s) - 2] += 1 S = [(key, val) for key, val in C.items()] S.sort(key=lambda x: (-x[1], -x[0])) print(S[0][0])