#include<iostream>
#include<string>
#include<sstream>
using namespace std;

int main(){
	string str;
	string word[1111];
	getline(cin,str);
	stringstream ss;
	int cou = 0;
	ss << str;
	while(!ss.eof()){
		string tmp;
		ss >> tmp;
		word[cou] = tmp;
		cou++;
	}
	unsigned int loc;
	for(int i=0;i<cou;i++){
		loc = word[i].find("apple",0 );
		if(loc != string::npos ){
			word[i].replace(loc,5,"peach");
			cout << word[i];
		}
		else{
			loc = word[i].find("peach",0 );
			if(loc != string::npos ){
				word[i].replace(loc,5,"apple");
				cout << word[i];
			}
			else cout << word[i];
		}
		if(i != cou-1) cout << " ";
	}
	cout << endl;
}