#0001.rb

#???????????\????????????????????????????????????
height_num = []
input_roop = 10
output_roop = 2

for input in 1..input_roop do
  #get????????¨???????????????????????§int?????????
  height = gets.to_i
  #?????????????????°?????????????????\??????
  height_num.push(height)
end

#??§????????????3????¬????????????§???????????????
heighest3 = height_num.sort.reverse

for output in 0..output_roop do
  puts heighest3[output]
end