#include<iostream>
#include<string>

using namespace std;

int main(void)
{
	string s;
	while(getline(cin,s)){
	while(1)
	{
		string::size_type index1=s.find("apple");
		if(index1!=string::npos)s.replace(index1,5,"rep1");
		string::size_type index2=s.find("peach");
		if(index2!=string::npos)s.replace(index2,5,"rep2");
		if(index1==string::npos&&index2==string::npos)break;
	}
	while(1)
	{
		string::size_type index1=s.find("rep1");
		string::size_type index2=s.find("rep2");
		if(index1!=string::npos)s.replace(index1,4,"peach");
		if(index2!=string::npos)s.replace(index2,4,"apple");
		if(index1==string::npos&&index2==string::npos)break;
	}cout<<s<<endl;
	}
	
}