object Main extends App {
  val src: List[String] = io.Source.stdin.getLines.next.split(" ").toList

  println(src.map { case "apple" => "peach"
                    case "apple." => "peach."
                    case "peach" => "apple"
                    case "peach." => "apple."
                    case x => x
                  }.mkString(" "))
}