#include<iostream>
using namespace std;

int main() {
	string hoge;
	
	while( cin >> hoge ) {
		int piriod = hoge.find(".",0);
		if ( piriod != string::npos ) {
			hoge.replace( hoge.length()-1,1,"");
		}
		
		if ( hoge == "peach" ) {
			cout << "apple";
		} else if ( hoge == "peach," ) {
			cout << "apple,";
		} else if ( hoge == "apple" ) {
			cout << "peach";
		} else if ( hoge == "apple," ) {
			cout << "peach,";
		} else {
			cout << hoge;
		}
		
		if ( piriod == string::npos ) {
			cout << " ";
		} else {
			cout << "." << endl;
		}
	}
	
}