#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 key[] = {"apple", "peach"};
	string input;
	while(cin >> input){
		if(cin.eof()) break;
		
		int p = input.find(key[1]), a = input.find(key[0]);
		while(a != string::npos){
			input.replace(a, 5, key[1]);
			a = input.find(key[0], a + 5);
		}
		while(p != string::npos){
			input.replace(p, 5, key[0]);
			p = input.find(key[1], p + 5);
		}
		
		cout << input;

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

	return 0;
}