import Data.List
main = getLine >>= switchAP >>= putStrLn

switchAP :: String -> IO String
switchAP = return . unwords.foldr ((:).switchAP') [].words 

switchAP' :: String -> String
switchAP' x
  | x == "apple" = "peach"
  | x == "peach" = "apple"
  | "apple" `isPrefixOf` x = "peach" ++ drop 5 x
  | "peach" `isPrefixOf` x = "apple" ++ drop 5 x
  | otherwise    = x