import std.stdio;
import std.algorithm;
import std.string;
import std.conv;
import std.math;

void main(){

    auto s = split(readln());
    for(int i=0;i<s.length;i++){
	if(s[i] == "peach") s[i] = "apple";
	if(s[i] == "peach.") s[i] = "apple.";
    }
    for(int i=0;i<s.length-1;i++){
	writef("%s ",s[i]);
    }
    writef("%s\n",s[s.length-1]);
}