#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]);
		if(a != string::npos){
			for(int i = a; i < a + 5; i++){
				input[i] = key[1][i - a];
			}
			cout << input;
		}
		else if(p != string::npos){
			for(int i = p; i < p + 5; i++){
				input[i] = key[0][i - p];
			}
			cout << input;
		}
		else cout << input;

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

	return 0;
}