import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

void main()
{
    auto s = readln().chomp();
    string t;
    for(int i=0; i<s.length; )
    {
        if(startsWith(s[i..$],"apple")) t~="peach", i+=5;
        else if(startsWith(s[i..$],"peach")) t~="apple", i+=5;
        else t~=s[i], ++i;
    }
    writeln(t);
}