#include<iostream>
#include<string>
using namespace std;
int main() {
string a;
while(getline(cin,a)){
if( a.find("apple")!=-1){
a.replace( a.find("apple"),5,"peach");
}else if( a.find("peach")!=-1){
a.replace( a.find("peach"),5,"apple");
}
}
cout << a << endl;
  return 0;
}
