#include <cstdio>
#include<iostream>
#include<string>

using namespace std;
 
int main(void){

	string inp("");
	char put;
	string ans("");

	while(1){
		put=getchar();
		if(put=='\n') break;
		if(put==' '||put=='.'){
			if(inp=="apple") inp="peach";
			else if(inp=="peach") inp="apple";
			ans+=inp;
			if(put==' ') ans+=' ';
			else if(put=='.') ans+='.';
			inp=("");
		}
		else inp+=put;
	}
	if(inp=="apple") inp="peach";
	else if(inp=="peach") inp="apple";
	ans+=inp;
	cout<<ans<<endl;
    return 0;
}