str = gets.to_s a = Array.new str.length.times do |i| a[i] = str[i] end a.sort!{|a, b| b <=> a} a.each do |x| print x end puts