mount_list = []

for i in range(10):
  mount_list.append(int(input()))

mount_list.sort(reverse = True)

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

for i in range(10):
  mount_list.append(int(input()))

mount_list.sort(reverse = True)

for i in range(3):
  print(mount_list[i])
