pTa :: String -> String
pTa = unwords . map (
        \c -> case c of
                    "apple" -> "peach"
                    "peach" -> "apple"
                    s -> s
                    ) . words

main = getLine >>= putStrLn . pTa