#include<iostream>
#include<stdio.h>

using namespace std;

int main(){

  char in;
  string out = "";
  while(scanf("%c",&in) != EOF){
    if(in>='a' && in<='z'){
      out += in;
    }else{
      if(out == "apple") cout << "peach";
      else if(out == "peach") cout << "apple";
      else cout << out;
      cout << in;
      out = "";
    }
  }
  return 0;
}