data = []
i = 0
while n = gets
  data[i] = n.chomp.to_i
  i+=1
end

b = 0

for a in 0..i-2
  for b in 0..i-2
    if data[b] < data[b+1]
      data[b],data[b+1] = data[b+1],data[b]
    end
  end
end

for i in 0..2
  puts data[i]
end
