import Data.Char
import Data.Maybe
import qualified Data.Map.Strict as M

main = getContents >>= mapM_ (putStrLn . unwords . solve . words) . lines

solve :: [String] -> [String]
solve xs = map (decrypt n)  xs
   where n = head . mapMaybe (flip M.lookup keys) $ xs

keys :: M.Map String Int   
keys = M.fromList $ concatMap (\s -> map (\n -> (encrypt n s, n)) [0..25]) ["the", "this", "that"]
   
ceaser :: Int -> Char -> Char
ceaser key c 
   | c < 'a' || c > 'z' = c
   | otherwise          = chr . flip mod 128 $ n'
   where n' | n > 122   = n - 26
            | n < 97    = n + 26
            | otherwise = n
               where n = ord c + key
               
encrypt :: Int -> String -> String
encrypt key = map $ ceaser key

decrypt :: Int -> String -> String
decrypt key = map $ ceaser (- key)
