#encoding:utf-8 No.0018 2014.10.1
numbers = []
while gets
  ary = $_.chomp.split
  ary.length.times do |i|
    ary[i] = ary[i].to_i
  end
  numbers.push ary
end

numbers.length.times do |i|
  numbers[i].length.times do |j|
    print "#{numbers[i].sort.reverse[j]}\s"
  end
  print "\n"
end