Buggy python submission (verdict: Runtime Error):
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans*=[i]
ans.sort()
for i in ans:
  print(i)

Fixed submission:
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)

Buggy python submission (verdict: Runtime Error):
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[xs])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans*=[i]
ans.sort()
for i in ans:
  print(i)


Fixed submission:
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lst=[input() for i in range(n)]
xs=list(set(lst))
ans=[]
for i in xs:
  cnt=lst.count(i)
  ans.append([i,cnt])
ans.sort(key=lambda x:x[1])
pin=ans[-1][1]
ans2=[]
for i in ans:
  if i[1]==pin:
    ans2.append(i[0])
ans2.sort()
for i in ans2:
  print(i)

Fixed submission:
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)

Buggy python submission (verdict: Runtime Error):
n=int(input())
lst=[input() for i in range(n)]
xs=list(set(lst))
ans=[]
for i in xs:
  cnt=lst.count(i)
  ans,append([i,cnt])
ans.sort(key=lambda x:x[1])
pin=ans[-1][1]
ans2=[]
for i in ans:
  if i[1]==pin:
    ans2.append(i[0])
ans2.sort()
for i in ans2:
  print(i)

Fixed submission:
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[input() for i in range(n)]
b=list(set(a))
c=[]
d=0
for i in b:
  if a.count(i)>d:
    c=[i]
    d=a.count(i)
  elif a.count(i)==d:
    c+=[i]
c.sort()
for i in c:
  print(i)


Fixed submission:
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[input() for i in range(n)]
b=list(set(a))
c=[]
d=0
for i in b:
  if a.count(i)>d:
    c=[i]
    d=a.count(i)
  elif a.count(i)==d:
    c+=[i]
c.sort()
for i in c:
  print(i)


Fixed submission:
n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)