import Data.Char

rotate :: Int -> [a] -> [a]
rotate _ [] = []
rotate n xs = zipWith const (drop n (cycle xs)) xs

caesar :: Int -> Char -> Char
caesar n c
  | isAsciiLower c = cs !! (ord c - ord 'a')
  | otherwise      = c
  where cs = rotate n ['a'..'z']

solver :: String -> String
solver xs = head $ dropWhile f [map (caesar i) xs | i <- [0..(ord 'z' - ord 'a')]]
  where f s = let ws = words s
              in  not $ "the" `elem` ws || "this" `elem` ws || "that" `elem` ws

main :: IO ()
main = getContents >>= mapM_ (putStrLn . solver) . lines