s = gets.chomp a = [*'A'..'Z'] puts s.each_char.map.with_index { |e, idx| a[(a.index(e) - idx - 1) % 26] }.join