while line = gets
  line = line.chomp
  26.times do
    line = line.gsub(/[a-z]/){|char| char == 'z' ? 'a' : char.succ }
    words = line.split
    if words.include?('the') || words.include?('this') || words.include?('that')
      puts line
      break
    end
  end
end