a = ("a".."z").to_a

while line = gets
  result = ""
  words = line.chomp.split(//)
  1.upto(25) do |i|
    words.each do |c|
      # a_index = a.index(c)
      if c =~ /[a-z]/
        result += a[(a.index(c)+i)%26]
      elsif c =~ /\.|\s/
          result += c
      end
    end
    break if result.index(/the|this|that/)
    result = ""
  end
  puts result
end