import Data.List
import Control.Monad
import System.IO
    
replace = let 
        rel "peach" = "apple"
        rel "apple" = "peach"
        rel w = w
    in map rel

main = do
    s <- getLine
    print $ unwords $ replace . words $ map (\w -> if w == '.' || w == ',' then ' ' ; else w) s
