import Control.Monad
import Control.Applicative
import Data.List

replace = let 
        rel a
            | isPrefixOf "peach" a = "apple" ++ (a \\ "peach")
            | isPrefixOf "apple" a = "peach" ++ (a \\ "apple")
            | otherwise = a
    in map rel

main :: IO ()
main = do
    s <- getLine
    putStrLn $ unwords . replace . words $ s

