# your code goes here
import sys

a=[]
for line in sys.stdin:
  line.rstrip('rn')
  tmp=line.split(" ")
  a.append(int(tmp[-1]))

a.sort(reverse=True)
y=0
for i in a:
  if y==3:
    break
  if i>=0 and i<=10000:
    print(i)
    y=y+1 import sys sys a=[] a [] for line in sys.stdin:
  line.rstrip('rn')
  tmp=line.split(" ")
  a.append(int(tmp[-1])) line sys.stdin sys stdin line.rstrip('rn') line.rstrip line rstrip 'rn' tmp=line.split(" ") tmp line.split(" ") line.split line split " " a.append(int(tmp[-1])) a.append a append int(tmp[-1]) int tmp[-1] tmp -1 a.sort(reverse=True) a.sort a sort reverse=True reverse True y=0 y 0 for i in a:
  if y==3:
    break
  if i>=0 and i<=10000:
    print(i)
    y=y+1 i a if y==3:
    break
   y==3 y 3 break if i>=0 and i<=10000:
    print(i)
    y=y+1 i>=0 and i<=10000 i>=0 i 0 i<=10000 i 10000 print(i) print i y=y+1 y y+1 y 1 a=[] [] a y=y+1 y+1 y y=0 0 y tmp=line.split(" ") line.split(" ") tmp
# your code goes here
import sys

a=[]
for line in sys.stdin:
  line.rstrip('rn')
  tmp=line.split(" ")
  a.append(int(tmp[-1]))

a.sort(reverse=True)
y=0
for i in a:
  if y==3:
    break
  if i>=0 and i<=10000:
    print(i)
    y=y+1