#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    N = int(input())
    S = [input() for _ in range(N)]

    T = sorted((set(S)))
    l = len(T)

    D = {}
    for i in range(l):
        D[T[i]] = 0
    for i in range(N):
        D[S[i]] += 1

    m = max(D.values())
    for i in range(l):
        if D[T[i]] == m:
            print(T[i])


if __name__ == '__main__':
    main() import sys sys def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 def main():
    N = int(input())
    S = [input() for _ in range(N)]

    T = sorted((set(S)))
    l = len(T)

    D = {}
    for i in range(l):
        D[T[i]] = 0
    for i in range(N):
        D[S[i]] += 1

    m = max(D.values())
    for i in range(l):
        if D[T[i]] == m:
            print(T[i]) main 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 = [input() for _ in range(N)] S [input() for _ in range(N)] T = sorted((set(S))) T sorted((set(S))) sorted set(S) set S l = len(T) l len(T) len T D = {} D {} for i in range(l):
        D[T[i]] = 0
     i range(l) range l D[T[i]] = 0 D[T[i]] D T[i] T i 0 for i in range(N):
        D[S[i]] += 1

     i range(N) range N D[S[i]] += 1 D[S[i]] D S[i] S i 1 m = max(D.values()) m max(D.values()) max D.values() D.values D values for i in range(l):
        if D[T[i]] == m:
            print(T[i]) i range(l) range l if D[T[i]] == m:
            print(T[i]) D[T[i]] == m D[T[i]] D T[i] T i m print(T[i]) print T[i] T i if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input def main():
    N = int(input())
    S = [input() for _ in range(N)]

    T = sorted((set(S)))
    l = len(T)

    D = {}
    for i in range(l):
        D[T[i]] = 0
    for i in range(N):
        D[S[i]] += 1

    m = max(D.values())
    for i in range(l):
        if D[T[i]] == m:
            print(T[i]) def main():
    N = int(input())
    S = [input() for _ in range(N)]

    T = sorted((set(S)))
    l = len(T)

    D = {}
    for i in range(l):
        D[T[i]] = 0
    for i in range(N):
        D[S[i]] += 1

    m = max(D.values())
    for i in range(l):
        if D[T[i]] == m:
            print(T[i]) main
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    N = int(input())
    S = [input() for _ in range(N)]

    T = sorted((set(S)))
    l = len(T)

    D = {}
    for i in range(l):
        D[T[i]] = 0
    for i in range(N):
        D[S[i]] += 1

    m = max(D.values())
    for i in range(l):
        if D[T[i]] == m:
            print(T[i])


if __name__ == '__main__':
    main()
