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

const string p = "peach";
const string a = "apple";

int main()
{
	string str;
	getline(cin, str);
	for(unsigned i=0; i<str.size()-p.size(); i++){
		bool aflag=true,pflag=true;
		for(unsigned j=0;j<p.size();j++){
			if(str[i+j] != p[j])
				pflag = false;
			if(str[i+j] != a[j])
				aflag = false;
		}
		if(aflag){
			for(unsigned j=0;j<p.size();j++){
				str[i+j] = p[j];
			}
		}
		if(pflag){
			for(unsigned j=0;j<a.size();j++){
				str[i+j] = a[j];
			}
		}
	}
	cout << str << endl;
	return 0;
}