#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s,ans;
    while(cin >> s)   
    {
        if(s=="apple"){ans+= "peach ";continue;}
        if(s=="apple."){ans+= "peach. ";continue;}
        if(s=="apple,"){ans+= "peach, ";continue;}
        if(s=="peach"){ans+= "apple ";continue;}
        if(s=="peach,"){ans+= "apple, ";continue;}
        if(s=="peach."){ans+= "apple. ";continue;}
        ans += s+" "; continue;
    }
    ans = ans.substr(0,ans.length()-1);
    cout << ans << endl;
    return 0;
}