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


int main() {
	string str;
	getline(cin, str);
	stringstream ss(str);

	while (!ss.eof()) {
		ss >> str;
		int n = str.length() - 1;
		char last = str[n];
		if (!isalpha(last)) {
			str.erase(n);
		}
		else {
			last = '\0';
		}
		if (str == "apple") {
			cout << "peach";
		}
		else if (str == "peach") {
			cout << "apple";
		}
		else {
			cout << str;
		}
		if (last) {
			cout << last;
		}
		cout << (!ss.eof() ? ' ' : '\n');	
	}
	return 0;
}