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

int main() {
	string hoge;
	
	while( cin >> hoge ) {
		int piriod = hoge.find(".");
		if ( hoge.find("peach") != string::npos ) {
			hoge.replace( hoge.find("peach"),5,"apple" );

		} else if ( hoge.find("apple") != string::npos ) {
			hoge.replace( hoge.find("apple"),5,"peach" );
		}
		cout << hoge;
		if ( piriod == string::npos ) {
			cout << " ";
		}
	}
	cout << endl;
}