#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;

int main()
{
	string str;
	getline(cin,str);
	string word = "";
	string sentence = "";

	for(unsigned i=0;i<str.size();i++){
		if(!isalpha(str[i])){
			if(word == "apple"){
				word = "peach";
			}
			else if(word == "peach")
				word = "apple";
			word += str[i];
			sentence += word;
			word = "";
		}	
		else{
			word += str[i];
		}
	}
	if(word == "apple"){
		word = "peach";
	}
	else if(word == "peach")
		word = "apple";
	sentence += word;
	cout << sentence << endl;
	return 0;
}