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

int main(){
	string in;
	getline(cin, in);

	for(int i = 0; i < in.size() - 4; i++){
		if(in[i] == 'a' && in[i+1] == 'p' && in[i+2] == 'p' && in[i+3] == 'l' && in[i+4] == 'e'){
			in[i] = 'p';
			in[i+1] = 'e';
			in[i+2] = 'a';
			in[i+3] = 'c';
			in[i+4] = 'h';
		}else if(in[i] == 'p' && in[i+1] == 'e' && in[i+2] == 'a' && in[i+3] == 'c' && in[i+4] == 'h'){
			in[i] = 'a';
			in[i+1] = 'p';
			in[i+2] = 'p';
			in[i+3] = 'l';
			in[i+4] == 'e';
		}
	}

	cout << in << endl;

	return 0;
}