#include <iostream>
#include <string>
using namespace std;

int main() {
	int aloc,ploc;
	string s;
	getline(cin,s);
	aloc=s.find("apple",0);
	ploc=s.find("peach",0);
	if(aloc==string::npos){}
	else{s.replace(aloc,5,"peach");}
	if(ploc==string::npos){}
	else{s.replace(ploc,5,"apple");}
	cout<<s<<endl;
	return 0;
}