#include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a; i<n; i++)
using namespace std;

int main() {
	string s;
	getline(cin, s);
	rep(i,0,s.length()-4) {
		if(s.substr(i,5) == "peach") {
			s.replace(i,5,"apple");
		}
		else if(s.substr(i,5) == "apple") {
			s.replace(i,5,"peach");
		}
	}
	cout << s << endl;
	return 0;
}