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

c = {}
res = []

for i in range(n):
    if List[i] in c.keys():
        c[List[i]] += 1
    else:
        c[List[i]] = 1

ac = c.most_common() ##これが無いとACにならない！！！！
                     ##毎回の計算がかなりの時間ロスだった
res.append(ac[0][0])
for i in range(1, leng):
    if ac[i][1] >= ac[i-1][1]:
        res.append(ac[i][0])
    else:
        break

#res = sorted(res)
res.sort()
for j in range(len(res)):
    print(res[j])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

Buggy python submission (verdict: Time Limit Exceeded):
import collections

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

c = collections.Counter(List)


leng = len(c)

res.append(c.most_common()[0][0])
for i in range(1, leng):
    if c.most_common()[i][1] >= c.most_common()[i-1][1]:
        res.append(c.most_common()[i][0])
    else:
        break

#res = sorted(res)
res.sort()
for j in range(len(res)):
    print(res[j])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

Buggy python submission (verdict: Runtime Error):
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(les(res)):
  print(res[i])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

Buggy python submission (verdict: Runtime Error):
import collections

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

c = collections.Counter(List)

for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(les(res)):
  print(res[i])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

Buggy python submission (verdict: Time Limit Exceeded):
import collections

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

c = collections.Counter(List)

leng = len(c)

res.append(c.most_common()[0][0])
for i in range(1, leng):
    if c.most_common()[i][1] >= c.most_common()[i-1][1]:
        res.append(c.most_common()[i][0])
    else:
        break

res = sorted(res)
for j in range(len(res)):
    print(res[j])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

Buggy python submission (verdict: Time Limit Exceeded):
import collections

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

c = collections.Counter(List)

res = [kv[0] for kv in c.items() if kv[1] == max(c.values())]


#print(sortdict)
res = sorted(res)
leng = len(res)
for i in range(leng):
    print(res[i])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

Buggy python submission (verdict: Time Limit Exceeded):
import collections

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

c = collections.Counter(List)

leng = len(c)

res.append(c.most_common()[0][0])
for i in range(1, leng):
    if c.most_common()[i][1] >= c.most_common()[i-1][1]:
        res.append(c.most_common()[i][0])
    else:
        break

res = sorted(res)
for j in range(len(res)):
    print(res[j])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

Buggy python submission (verdict: Time Limit Exceeded):
import collections

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

c = collections.Counter(List)

res = [kv[0] for kv in c.items() if kv[1] == max(c.values())]


#print(sortdict)
res = sorted(res)
leng = len(res)
for i in range(leng):
    print(res[i])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])

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

mydict = {}

for i in range(n):
    if List[i] in mydict.keys():
        mydict[List[i]] += 1
    else:
        mydict[List[i]] = 1
        
#sortdict = sorted(mydict.items(), reverse=True) 
res = [kv[0] for kv in mydict.items() if kv[1] == max(mydict.values())]


#print(sortdict)
res = sorted(res)
leng = len(res)
for i in range(leng):
    print(res[i])

Fixed submission:
import collections

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

c = collections.Counter(List)
m = 0
for v in c.values():
  m = max(m, v)
  
for k, v in c.items():
  if v == m:
    res.append(k)
    
res.sort()
for i in range(len(res)):
  print(res[i])