while gets
  str, arr = $_.chomp, [*"a".."z"]
  
  26.times do
    break if /the|this|that/ =~ str
    
    j = 0
    
    str.each_char do |c|
      if /\w/ =~ c
        idx = (arr.index(c) + 1) % 26
        str[j] = arr[idx]
      end
      j += 1
    end
  end
  
  puts str
end