#include <bits/stdc++.h>

using namespace std;

int main()
{
    bool f = 0;
    string s, t;
    getline(cin, s);
    s.pop_back();
    stringstream ss(s);
    while (ss >> t) {
        if (f) cout << " ";
        f = 1;
        if (t == "peach") {
            cout << "apple";
        } else if (t == "apple") {
            cout << "peach";
        } else {
            cout << t;
        }
    }
    cout << "." << endl;
    return 0;
}