#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;

    bool f = false;

    while (cin >> s) {
        if (f) cout << " ";
        if (s == "apple") cout << "peach";
        else if (s == "peach") cout << "apple";
        else cout << s;
        f = true;
    }
}