#include "bits/stdc++.h"

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

string solve(string s){
    string ret=s;
    
    int firstSpace=ret.find(' ');
    
    if( ret.substr(0,firstSpace)=="apple" )ret.replace(0,5,"peach");
    else if( ret.substr(0,firstSpace)=="peach" )ret.replace(0,5,"apple");
    
    rep(i,ret.size()-7){
        if(ret.substr(i,7)==" apple ")ret.replace(i,7," peach ");
        else if(ret.substr(i,7)==" peach ")ret.replace(i,7," apple ");
    }
    
    int len=s.size();
    
    if( ret.substr(s.size()-7,7)==" apple." )ret.replace(s.size()-7,7," peach.");
    else if( ret.substr(s.size()-7,7)==" peach." )ret.replace(s.size()-7,7," apple.");
    
    return ret;
}


//std::string str("12345");
//str.replace(1, 2, "xyz");
//std::cout << str << "\n";

int main(){
    string s;
    getline(cin,s);
    
    cout<<solve(s)<<endl;
    
    return 0;
}