input_array = gets.chomp.chars count = 1 for input in input_array if count > 26 count = 1 end input = input.ord - count if input < 65 input = 26 + input elsif input > 90 input = 156 - input end input = input.chr print input count += 1 end