import Data.Char (ord) import Data.List (nub, sort) main :: IO () main = do s <- getLine putStrLn $ map decode s tbl :: [(Char, Char)] tbl = nub $ sort $ ('z','k') : zip "pfnovuaxqwufmbgrihcdejkolsty" "orangecipherbqsuftlmdxynzvwj" decode :: Char -> Char decode = snd . (tbl!!) . subtract (ord 'a') . ord