#include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
#include<map>
#include<cmath>
#include<complex>
using namespace std;

typedef complex<double> P;

#define X real()
#define Y imag()
typedef int kz;

kz gcd(kz a,kz b) { if(b==0) return a; else gcd(b,a%b); }

int main(){
    int mod=1000000007;
    int i=0;
    char s[260];
    string o,n;
    while (cin>>n) {
        if (i!=0) {
            if (o=="peach") {
                cout<<"apple ";
            } else if (o=="apple") {
                cout<<"peach ";
            } else {
                cout<< o << " ";
            }
        } else {
            i=1;
        }
        o=n;
    }
    if (o=="peach.") {
        cout<<"apple.\n";
    } else if (o=="apple.") {
        cout<<"peach.\n";
    } else {
        cout<< o << endl;
    }
    return 0;
}