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

int main() {
	string sa;
	getline(cin, sa);
	int z = sa.size();
	for (int i = 0; i < z - 7; i++) {
		string sb = sa.substr(i, 7);
		if (sb == " apple ") {
			sa.replace(i, 7, " peach ");
		}
		if (sb == " peach ") {
			sa.replace(i, 7, " apple ");
		}
	}
	cout << sa << endl;
	return 0;
}