m=[]
for i in 0..9
  m[i]=gets.chomp.to_i
end

for i in 0..(m.length-1)
  j=m.length-1
  while j>=i
    if m[j-1]<=m[j]
      t=m[j]
      m[j]=m[j-1]
      m[j-1]=t
    end
    j-=1
  end
end

for i in 0..2
  print m[i],"\n"
end


