#include <iostream>
#include <string>
using namespace std;

string str;
int main() {
    while (cin >> str) {
        if (str == "apple") {
            cout << "peach ";
        } else if (str == "peach") {
            cout << "apple ";
        } else if (str == "apple.") {
            cout << "peach.";
        } else if (str == "peach.") {
            cout << "apple.";
        } else {
            cout << str << ' ';
        }
    }
    return 0;
}