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

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