s=gets.chomp.split("") a = [*"A".."Z"] b ="" s.each_index do |i| j = i j -=26*((i+1)/26) if i >25 b << a[(a.index(s[j]))- (j+1)] end puts b