#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
	vector<string> sentence;
	string s;
	while(getline(cin, s)){
		if(s == "peach"){
			sentence.push_back("apple");
		}
		else if(s == "apple"){
			sentence.push_back("peach");
		}
		else{
			sentence.push_back(s);
		}
	}
	vector<string>::iterator it = sentence.begin();
	while(it != sentence.end()){
		cout << *it;
		++it;
	}
	cout << endl;
}