#include<iostream>
#include<string>
#include<algorithm>
#include<istream>
using namespace std;
int main(){
        int p1,p2;
        string a,s,apple,peach;
        apple="apple";
        peach="peach";
        getline(cin,a);
        p1 = a.find(apple);
        p2 = a.find(peach);
        a.replace(p1,5,peach);
        a.replace(p2,5,apple);
        cout<<a<<endl;
}