

num_of_votes = int(input())

poll = {}

for i in range(num_of_votes):
    entry = input()
    
    if (poll.get(entry) == None):
        poll[entry] = 0
    
    poll[entry] += 1

max_votes = 0
most_voted_entries = []

for key in poll:
    num_of_votes = poll[key]

    if num_of_votes > max_votes:
        most_voted_entries = [ key ]
        max_votes = num_of_votes
    elif num_of_votes == max_votes:
        most_voted_entries.append(key)

for entry in sorted(most_voted_entries):
    print(entry) num_of_votes = int(input()) num_of_votes int(input()) int input() input poll = {} poll {} for i in range(num_of_votes):
    entry = input()
    
    if (poll.get(entry) == None):
        poll[entry] = 0
    
    poll[entry] += 1 i range(num_of_votes) range num_of_votes entry = input() entry input() input if (poll.get(entry) == None):
        poll[entry] = 0
    
     poll.get(entry) == None poll.get(entry) poll.get poll get entry None poll[entry] = 0 poll[entry] poll entry 0 poll[entry] += 1 poll[entry] poll entry 1 max_votes = 0 max_votes 0 most_voted_entries = [] most_voted_entries [] for key in poll:
    num_of_votes = poll[key]

    if num_of_votes > max_votes:
        most_voted_entries = [ key ]
        max_votes = num_of_votes
    elif num_of_votes == max_votes:
        most_voted_entries.append(key) key poll num_of_votes = poll[key] num_of_votes poll[key] poll key if num_of_votes > max_votes:
        most_voted_entries = [ key ]
        max_votes = num_of_votes
    elif num_of_votes == max_votes:
        most_voted_entries.append(key) num_of_votes > max_votes num_of_votes max_votes most_voted_entries = [ key ] most_voted_entries [ key ] key max_votes = num_of_votes max_votes num_of_votes elif num_of_votes == max_votes:
        most_voted_entries.append(key) num_of_votes == max_votes num_of_votes max_votes most_voted_entries.append(key) most_voted_entries.append most_voted_entries append key for entry in sorted(most_voted_entries):
    print(entry) entry sorted(most_voted_entries) sorted most_voted_entries print(entry) print entry entry = input() input() entry most_voted_entries = [] [] most_voted_entries max_votes = 0 0 max_votes poll = {} {} poll num_of_votes = poll[key] poll[key] num_of_votes num_of_votes = int(input()) int(input()) num_of_votes most_voted_entries = [ key ] [ key ] most_voted_entries max_votes = num_of_votes num_of_votes max_votes


num_of_votes = int(input())

poll = {}

for i in range(num_of_votes):
    entry = input()
    
    if (poll.get(entry) == None):
        poll[entry] = 0
    
    poll[entry] += 1

max_votes = 0
most_voted_entries = []

for key in poll:
    num_of_votes = poll[key]

    if num_of_votes > max_votes:
        most_voted_entries = [ key ]
        max_votes = num_of_votes
    elif num_of_votes == max_votes:
        most_voted_entries.append(key)

for entry in sorted(most_voted_entries):
    print(entry)