input = gets.to_s input.split('').reverse_each { |i| print i if i != "\n" } puts ""