Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]

m = 0
for i in s:
    mae = len(s)
    s = [j for j in s if j != i]
    ato = len(s)
    num = mae - ato

    if num > m:
        ans = [i]
        m = num
    elif num == m:
        ans.append(i)


ans.sort()

#print(*ans,sep='\n')
print('\n'.join(map(str, ans)))
#for i in range(len(ans)):
#    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')

Buggy python submission (verdict: Runtime Error):
 = int(input())
s = [input() for i in range(n)]

m = 0
for i in s:
    mae = len(s)
    s = [j for j in s if j != i]
    ato = len(s)
    num = mae - ato

    if num > m:
        ans = [i]
        m = num
    elif num == m:
        ans.append(i)


ans.sort()

#print(*ans,sep='\n')
print('\n'.join(map(str, ans)))
#for i in range(len(ans)):
#    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]

m = 0
for i in s:
    mae = len(s)
    s = [j for j in s if j != i]
    ato = len(s)
    num = mae - ato

    if num > m:
        ans = [i]
        m = num
    elif num == m:
        ans.append(i)
    if ato - 1 == i:
        break

ans.sort()

print(*ans,sep='\n')
#print('\n'.join(map(str, ans)))
#for i in range(len(ans)):
#    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]

m = 0
for i in s:
    mae = len(s)
    s = [j for j in s if j != i]
    ato = len(s)
    num = mae - ato

    if num > m:
        ans = [i]
        m = num
    elif num == m:
        ans.append(i)
    if ato - 1 == i:
        break

ans.sort()

print(*ans,sep='\n')
#print('\n'.join(map(str, ans)))
#for i in range(len(ans)):
#    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]

u = set(s)
m = 0
ans = []

for i in u:
    mae = len(s)
    s = [j for j in s if j != i]
    ato = len(s)
    num = mae - ato

    if num > m:
        ans = [i]
        m = num
    elif num == m:
        ans.append(i)

ans.sort()

print('\n'.join(map(str, ans)))
#for i in range(len(ans)):
#    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]

u = set(s)
m = 0
ans = []

for i in u:
    if s.count(i) > m:
        ans = [i]
        m = s.count(i)
    elif s.count(i) == m:
        ans.append(i)

ans.sort()

print('\n'.join(map(str, ans)))
#for i in range(len(ans)):
#    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
for i in range(n):
    s.append(input())

u = set(s)
m = 0
ans = []

for i in u:
    if s.count(i) > m:
        ans = [i]
        m = s.count(i)
    elif s.count(i) == m:
        ans.append(i)

ans.sort()

print('\n'.join(map(str, ans)))
#for i in range(len(ans)):
#    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = []
for i in range(n):
    s.append(input())

u = set(s)
m = 0
ans = []

for i in u:
    if s.count(i) > m:
        ans = [i]
        m = s.count(i)
    elif s.count(i) == m:
        ans.append(i)

ans.sort()
for i in range(len(ans)):
    print(ans[i])

        


Fixed submission:
import collections

n = int(input())
s = [input() for i in range(n)]

c = collections.Counter(s)
common = c.most_common()

count = common[0][1]
ans = []
for i in common:
  if i[1] == count:
    ans.append(i[0])
  else:
    break
ans.sort()
print(*ans,sep='\n')