#include "bits/stdc++.h"
using namespace std;

int main() {
	string str; bool check = false; char temp;
	while (cin >> str) {
		if (check == true) cout << " " << flush;
		check = true;
		if (str == "apple") cout << "peach" << flush;
		else if (str.size() == 6 && str[0] == 'a' && str[1] == 'p'
			&& str[2] == 'p' && str[3] == 'l' && str[4] == 'e') {
			temp = str[5];
			if (!(temp >= 'a' && temp <= 'z')) {
				cout << "peach" << temp << flush;
			}
			else cout << str << flush;
		}
		else if (str == "peach") cout << "apple" << flush;
		else if (str.size() == 6 && str[0] == 'p' && str[1] == 'e'
			&& str[2] == 'a' && str[3] == 'c' && str[4] == 'h') {
			cout << "apple" << flush;
			temp = str[5];
			if (!(temp >= 'a' && temp <= 'z')) {
				cout << "apple" << temp << flush;
			}
			else cout << str << flush;
		}
		else cout << str << flush;
	}
	cout << endl;
	return 0;
}
