import qualified Data.String.Utils as S
main = getLine >>= switchAP >>= putStrLn

switchAP :: String -> IO String
switchAP x = return $ switchAP' x

switchAP' = S.replace "x" "apple".S.replace "apple" "peach".S.replace "peach" "x"