h1 = 0
h2 = 0
h3 = 0
cnt = 0

while cnt <= 10

  h = gets.chomp.to_i

  if h >= h1
    h3 = h2
    h2 = h1
    h1 = h
  elsif h >= h2
    h3 = h2
    h2 = h
  elsif h >= h3
    h3 = h
  end

  cnt = cnt + 1

end

puts h1.to_s
puts h2.to_s
puts h3.to_s