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

int main()
{
	string str;
	bool f = false;
	
	while (cin >> str){
		if (f){
			printf(" ");
		}
		f = true;
		
		if (str.substr(0, 5) == "apple"){
			str.replace(0, 5, "peach");
		}
		else if (str.substr(0, 5) == "peach"){
			str.replace(0, 5, "apple");
		}
		cout << str;
	}
	
	cout << endl;
	
	return 0;
}