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

int main()
{
	char moji[1100], ansmoji[1100];
	bool first = false;

	while (cin >> moji){
		if (first != false){
			strcat(ansmoji, " ");
		}
		else {
			first = true;
		}
		if (strcmp(moji, "apple") == 0){
			strcat(ansmoji, "peach");
		}
		else if (strcmp(moji, "peach") == 0){
			strcat(ansmoji, "apple");
		}
		else if (strcmp(moji, "apple.") == 0){
			strcat(ansmoji, "peach.");
		}
		else if (strcmp(moji, "peach.") == 0){
			strcat(ansmoji, "apple.");
		}
		else {
			strcat(ansmoji, moji);
		}
	}
	cout << ansmoji << endl;
	return (0);
}