#include <string>
#include <string.h>
#include <iostream>
#include <algorithm>

using namespace std;

int main(void){

  string str;

  while(getline(cin,str)){

    int ix = 0;
    while( (ix = str.find("apple", ix)) >= 0 ) {
      str.replace(ix, strlen("apple"), "inari");
    }

    int iy = 0;
    while( (iy= str.find("peach", iy)) >= 0 ) {
      str.replace(iy, strlen("peach"), "apple");
    }


    int iz = 0;
    while( (iz= str.find("inari", iz)) >= 0 ) {
      str.replace(iz, strlen("inari"), "peach");
    }

    cout << str ;
    cout << endl;
  }

  return 0;

}
