Problem:
Sorting Five Numbers

Write a program which reads five numbers and sorts them in descending order.

Input

Input consists of five numbers a, b, c, d and e (-100000 ≤ a, b, c, d,e ≤ 100000). The five numbers are separeted by a space.

Output

Print the ordered numbers in a line. Adjacent numbers should be separated by a space.

Sample Input

3 6 9 7 5

Output for the Sample Input

9 7 6 5 3

Solution in Ruby (judge verdict: Accepted)

#encoding:utf-8
def sort array #バブルソートを用いる。小さい数値を後ろに追いやる
 j = 0
 while j < 4 
  i = 0
  while i < 4
   if array[i] < array[i+1]
    array[i],array[i+1] = array[i+1],array[i] #多重代入を利用して入れ替える
   end
   i += 1
  end
  j += 1
 end

 i = 0
 while i < 5
  if i != 4
   print "#{array[i]} "
   i += 1
  else
   print array[i]
   i += 1
  end
 end
end

numbers = gets.split
numbers.length.times do |i|
 numbers[i] = numbers[i].to_i
end

puts sort numbers