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

wordlist::String->[String]
wordlist "" = []
wordlist sent = [w] ++ (wordlist $ drop (length w) sent)
    where 
        h = head sent
        isAorD c = (isAlpha c)||(isDigit c)
        w = if not (isAorD h) then [h] else takeWhile isAorD sent

solve::String->String
solve str = str'
    where 
        list = wordlist str
        len = length list
        n_apple = filter (\i->(list!!i)=="apple") [0..(len-1)]
        n_peach = filter (\i->(list!!i)=="peach") [0..(len-1)]
        list'  = map (\i->if elem i n_apple then "peach" else list!!i)  [0..(len-1)]
        list'' = map (\i->if elem i n_peach then "apple" else list'!!i) [0..(len-1)]
        str' = concat list''

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