top1 = 0
top2 = 0
top3 = 0
for i in 0 ...9 do
	data = gets.to_i
	if data > top1
		top1 = data
	elsif data > top2
		top2 = data
	elsif data > top3
		top3 = data
	end
end
print top1, "\n", top2, "\n", top3, "\n"