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

void main(){

    auto s = chomp(readln());
    char[] ss;
    for(int i=0;i<s.length;i++){
	ss ~= s[i];
    }
    for(int i=0;i<s.length-4;i++){
	if(ss[i]=='a'&&ss[i+1]=='p'&&ss[i+2]=='p'&&ss[i+3]=='l'&&ss[i+4]=='e'){
	    ss[i] = 'p';
	    ss[i+1] = 'e';
	    ss[i+2] = 'a';
	    ss[i+3] = 'c';
	    ss[i+4] = 'h';
	}else if(ss[i]=='p'&&ss[i+1]=='e'&&ss[i+2]=='a'&&ss[i+3]=='c'&&ss[i+4]=='h'){
	    ss[i] = 'a';
	    ss[i+1] = 'p';
	    ss[i+2] = 'p';
	    ss[i+3] = 'l';
	    ss[i+4] = 'e';
	}
    }

    for(int i=0;i<s.length;i++)
	write(ss[i]);
    writeln();
}