#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
	string s;
	vector<int> n,m;
	n.push_back(0);
	m.push_back(0);
	getline(cin,s);
	if(s.find("apple"))
	  n.push_back(s.find("apple"));
	if(s.find("peach"))
	  m.push_back(s.find("peach"));
	
	for(int i=1; i<n.size(); i++)
	  s.replace(n[i], 5, "peach");
	for(int i=1; i<m.size(); i++)
	  s.replace(m[i], 5, "apple");
	
	cout << s << endl;
	return 0;
}