$chars = ("a".."z").to_a
def next_char(char, step)
  return char unless $chars.include?(char)

  idx = $chars.index(char)
  next_idx = (idx + step) % $chars.size
  $chars[next_idx].dup
end

line = gets.chomp

$chars.size.times do |step|
  transformed = line.gsub(/[a-z]/){|char| next_char(char, step)}
  words = transformed.split
  if words.include?('the') || words.include?('this') || words.include?('that')
    puts transformed
    break
  end
end