#include "bits/stdc++.h"
using namespace std;

int main() {
	string str; bool check = false;
	while (cin >> str) {
		if (check == true) cout << " " << flush;
		check = true;
		if (str == "apple") cout << "peach" << flush;
		if (str == "peach") cout << "apple" << flush;
		else cout << str << flush;
	}
	cout << endl;
	return 0;
}
