#include <iostream>
#include <string>

using namespace std;

const string a = "apple";
const string p = "peach";

int main()
{
    string inp;

    while (getline(cin, inp)) {
        string::size_type pos;

        for (pos = inp.find(a); pos != string::npos; 
             pos = inp.find(a, a.length() + pos)) {
            inp.replace(pos, a.length(), p);
        }
        for (pos = inp.find(p); pos != string::npos; 
             pos = inp.find(p, p.length() + pos)) {
            inp.replace(pos, p.length(), a);            
        }
        
        cout << inp << endl;
    }

    return 0;
}