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


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

	while (!ss.eof()) {
		ss >> str;
		string tmp = "";

		tmp = regex_replace(str,"apple", "peach");
		if (str == tmp) {
			tmp = regex_replace(str, "peach", "apple");
		}

		cout << tmp << (!ss.eof() ? ' ' : '\n');	
	}
	return 0;
}