#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	string word;

	while ( cin >> word )
	{
		if ( word == "apple" )
		{
			cout << "peach";
		}
		else if ( word == "apple." )
		{
			cout << "peach.";
		}
		else if ( word == "peach" )
		{
			cout << "apple";
		}
		else if ( word == "peach." )
		{
			cout << "apple.";
		}
		else
		{
			cout << word;
		}

		if ( *word.rbegin() != '.' )
		{
			cout << ' ';
		}
	}

	cout << endl;

	return 0;
}