#include "pch.h"
#include <iostream>
#include <string>

using namespace std;

int main()
{
	string x;
	string a = "apple";
	string b = "peach";
	string c = "apple.";
	string d = "peach.";

	cin >> x;
	if (x == a) { string x = "peach"; }
	if (x == b) { string x = "apple"; }
	if (x == c) { string x = "peach."; }
	if (x == d) { string x = "apple."; }
	cout << x;

	while (cin >> x) {
		if (x == a) { string x = "peach"; }
		if (x == b) { string x = "apple"; }
		if (x == c) { string x = "peach."; }
		if (x == d) { string x = "apple."; }
		cout << " " << x;
	}
   cout << endl; 
}

