#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
int main(){
	char a;
	string app = "apple";
	string pea = "peach";
    string ans[2000];
    int cnt = 0;
    while(scanf("%c",&a) != EOF){
        if(a == 10)break;
        if(a == ' ')cnt++;
        else if(a == '.'){
            cnt++;
            ans[cnt] += a;
        }
        else ans[cnt] += a;
    }

    for(int i = 0; i <= cnt; i++){
        if(ans[i] == app) ans[i] = pea;
        else if(ans[i] == pea) ans[i] = app;
    }

    for(int i = 0; i < cnt-1; i++){
        cout << ans[i] << ' ';
    }
    cout << ans[cnt-1] << ans[cnt] << endl;

    return 0;
}