i = 0
first   = 1
second  = 1
third  = 1
while i < 10
  mt = gets.to_i
  if mt >third
    if mt >second
      if mt >first
        third = second
        second = first
        first = mt
      else
        third = second
        second = mt
      end
    else
      third = mt
    end
  end
  i = i + 1
end
puts first
puts second
puts third



