import Debug.Trace
import Data.Char
import Data.List

wordlist::String->[String]
wordlist "" = []
wordlist sent = [w] ++ (wordlist $ drop (length w) sent)
    where 
        w
            | (take 5 sent)=="apple"  = "peach"
            | (take 5 sent)=="peach"  = "apple"
            | otherwise               = [head sent]

solve::String->String
solve str = concat $ wordlist str

main::IO ()
main = do
    str<-getLine::IO String
    putStrLn $ solve str