#include <iostream>
#include <string>

using namespace std;

int main()
{
	string s;
	while(cin >> s)
	{
		if(s.find('.') == string::npos)
		{
			if(s == "apple") cout << "peach" << " ";
			else cout << s << " ";
		}
		else
		{
			if(s == "apple.") cout << "peach." << endl;
			else cout << s << endl;
		}
	}
	cout << endl;
	return 0;
}