#include <iostream>
#include <string>
#include <cctype>

using namespace std;

int main(void)
{
	string s;
	char tmp = 'a';

	while (cin >> s) {
		if (!isalpha(s[s.size() - 1])) {
			tmp = s[s.size() - 1];
			s.erase(s.end() - 1);
		}

		if (s == "apple") {
			cout << "peach";
		} else if (s == "peach") {
			cout << "apple";
		} else {
			cout << s;
		}
		cout << " ";

		if (!isalpha(tmp)) {
			cout << "\b" << tmp;
			tmp = 'a';
		}
	}
	cout << endl;

	return 0;
}