#include <iostream>
#include <string>
using namespace std;
int main(){
	string str,a="apple",p="peach",tmp=".....";
	unsigned int loc=0;
	getline(cin,str);
	while((loc=str.find(a,loc))!=string::npos) str.replace(loc,a.length(),tmp);
	loc=0;
	while((loc=str.find(p,loc))!=string::npos) str.replace(loc,p.length(),a);
	loc=0;
	while((loc=str.find(tmp,loc))!=string::npos) str.replace(loc,tmp.length(),p);
	cout << str << endl;
	return 0;
}