import std.stdio, std.array, std.conv, std.algorithm, std.string, std.numeric, std.range;
string swap(string s){
	if(s.indexOf("apple")!=-1) return s.replace("apple", "peach");
	else if(s.indexOf("peach")!=-1) return s.replace("peach", "apple");
	else return s;
}
void main() {
	string s;
	while( (s=readln.strip).length != 0 ){
		auto as = s.split(' ').map!(swap).join(" ");
		writeln(as);
	}
}