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

main = do
  ss <- words <$> getLine
  putStrLn $ solve ss

solve :: [String] -> String
solve ss = intercalate " " $ map f ss
  where
    f s | s == "peach" = "apple"
        | s == "apple" = "peach"
        | s == "peach." = "apple."
        | s == "apple." = "peach."
        | otherwise = s
      