#include<iostream>
#include<string>

using namespace std;

int main(){
	string in;
	cin>>in;
	do{
		if(in=="apple")in="peach";
		else if(in=="apple.")in="peach.";
		else if(in=="peach")in="apple";
		else if(in=="peach.")in="apple.";
		cout<<in<<" ";
	}while(cin>>in);
	
	cout<<endl;
	
}