#include <stdio.h>
#include <iostream>
#include <string>

using namespace std;

int main() {

	string str;

	while (cin >> str) {
		if (str.substr(0,5) == "apple") {
			cout << "peach" << str.substr(5) << " ";
		} else if (str.substr(0,5) == "peach") {
			cout << "apple" << str.substr(5) << " ";
		} else {
			cout << str << " ";
		}
	}

	return 0;
}