#include	<iostream>
#include	<string>

using namespace std;

bool search(string &, int, string);
void replace(string &, int, string);

int main() {
	string str;

	getline(cin, str);
	for (int i = 0; i + 4 < str.size(); i++) {
		if (search(str, i, "apple")) { replace(str, i, "peach"); i += 4; }
		else if (search(str, i, "peach")) { replace(str, i, "apple"); i += 4; }
	}
	cout << str << endl;
}

bool search(string &str, int pos, string target) {
	for (int i = 0; i < target.size(); i++) {
		if (str[pos + i] != target[i]) { return false; }
	}
	return true;
}

void replace(string &str, int pos, string target) {
	for (int i = 0; i < target.size(); i++) {
		str[pos + i] = target[i];
	}
}