first=second=therd=0

for i in 1..10 do
	a = gets.chomp.to_i
	if first <= a then
		second = first
		first = a
	elsif second <= a then
		therd = second
		second = a
	elsif therd <= a then
		therd = a
	end
end
print first, "\n", second, "\n", therd, "\n"