inputNum = []

for i in range(0, 10):
  inputNum.append(int(raw_input()))

inputNum.sort(reverse=True)

for i in range(0, 3):
  print inputNum[i] inputNum = [] inputNum [] for i in range(0, 10):
  inputNum.append(int(raw_input())) i range(0, 10) range 0 10 inputNum.append(int(raw_input())) inputNum.append inputNum append int(raw_input()) int raw_input() raw_input inputNum.sort(reverse=True) inputNum.sort inputNum sort reverse=True reverse True for i in range(0, 3):
  print inputNum[i] i range(0, 3) range 0 3 print inputNum[i] inputNum i inputNum = [] [] inputNum
inputNum = []

for i in range(0, 10):
  inputNum.append(int(raw_input()))

inputNum.sort(reverse=True)

for i in range(0, 3):
  print inputNum[i]