mount=[]
for i in range(10):
  tmp=int(input())
  mount.append(tmp)
mount.sort()
mount.reverse()
for i in range(3):
    print(mount[i]) mount=[] mount [] for i in range(10):
  tmp=int(input())
  mount.append(tmp) i range(10) range 10 tmp=int(input()) tmp int(input()) int input() input mount.append(tmp) mount.append mount append tmp mount.sort() mount.sort mount sort mount.reverse() mount.reverse mount reverse for i in range(3):
    print(mount[i]) i range(3) range 3 print(mount[i]) print mount[i] mount i tmp=int(input()) int(input()) tmp mount=[] [] mount
mount=[]
for i in range(10):
  tmp=int(input())
  mount.append(tmp)
mount.sort()
mount.reverse()
for i in range(3):
    print(mount[i])