m=[]
for i in range(10):
    x = input()
    m.append(x)
m.sort()
m.reverse()
for i in range(0,3):
    print m[i]
  m=[] m [] for i in range(10):
    x = input()
    m.append(x) i range(10) range 10 x = input() x input() input m.append(x) m.append m append x m.sort() m.sort m sort m.reverse() m.reverse m reverse for i in range(0,3):
    print m[i]
  i range(0,3) range 0 3 print m[i] m i x = input() input() x m=[] [] m
m=[]
for i in range(10):
    x = input()
    m.append(x)
m.sort()
m.reverse()
for i in range(0,3):
    print m[i]
 