#include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

int main(){
	string str;
	getline(cin,str);
	for(int i=0;i<str.size();i++){
		if(str[i] == 'a' &&str[i+1] == 'p' && str[i+2]== 'p' && str[i+3] == 'l' && str[i+4] == 'e'){
			str[i] = 'p';
			str[i+1] = 'e';
			str[i+2] = 'a';
			str[i+3] = 'c';
			str[i+4] = 'h';
		}else if(str[i] == 'p' &&str[i+1] == 'e' && str[i+2]== 'a' && str[i+3] == 'c' && str[i+4] == 'h'){
			str[i] = 'a';
			str[i+1] = 'p';
			str[i+2] = 'p';
			str[i+3] = 'l';
			str[i+4] = 'e';
		}
	}
	cout << str << endl;
}

/*	string str;
	getline(cin,str);
	for(int i=0;i<str.size();i++){
		if(str.find("apple") != string::npos){
			str.replace(str.find("apple"),5,"peach");
		}
		if(str.find("peach") != string::npos){
			str.replace(str.find("peach"),5,"apple");
		}
	}
	cout << str << endl;
}*/