
 a = [0,0,0,0,0,0,0,0,0,0]
 
for num in 0..9 do
 
	a[num] = gets.to_i
 
end

	n = a.size - 1
	for i in 0..n
		for j in 0..n - i - 1
			if a[j] > a[j + 1]
				tmp = a[j]
				a[j] = a[j + 1]
				a[j + 1] = tmp
			end
		end
	 end
	 
puts a[9]
puts a[8]
puts a[7]