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

int main() {
	string str;
	while (cin>> str) {
		size_t pos;
		if ((pos = str.find("apple")) != string::npos) {
			str.replace(pos, 5, "peach");
			cout << str;
		}
		else if ((pos = str.find("peach")) != string::npos) {
			str.replace(pos, 5, "apple");
			cout << str;
		}
		else {
			cout << str;
		}
		if (cin) {
			cout << ' ';
		}
	}
	cout << endl;
	return 0;
}