#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>

using namespace std;

int main(){
	string input;
	while(cin >> input){
		if(cin.eof()) break;
		
		if(input.find("peach") != string::npos) cout << "apple";
		else if(input.find("apple") != string::npos) cout << "peach";
		else cout << input;

		if(input.find(".") != string::npos){
			cout << "." << endl;
			break;
		}
		else cout << " ";
	}

	return 0;
}