#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s;
    bool fst = false;
    while (cin >> s) {
        if (fst) {
            cout << " ";
        } else {
            fst = true;
        }
        if (s == "apple") {
            cout << "peach";
        } else if (s == "peach") {
            cout << "apple";
        } else if (s == "apple.") {
            cout << "peach.";
        } else if (s == "peach.") {
            cout << "apple.";
        } else {
            cout << s;
        }
    }
    return 0;
}
        