while orig = gets
  orig = orig.chomp.split("")

  while true
    orig.length.times do |i|
      unless orig[i] == " " || orig[i] == "."
        orig[i] = (orig[i].ord + 1).chr
        if orig[i].ord > 122 # z.ord == 122
          orig[i] = (orig[i].ord - 26).chr
        end
      end
    end
    break if orig.join =~ /the|this|that/
  end
  puts orig.join
end