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

int main()
{
	int a=0;
	string str;
	cin >> str;
	if(str=="apple")
		cout << "peach";
	else if(str=="peach")
		cout << "apple";
	else
		cout << str;
	while(cin >> str){
		cout << " ";
		if(str=="apple")
			cout << "peach";
		else if(str=="peach")
			cout << "apple";
		else
			cout << str;
	}
	cout << endl;
	return 0;
}