#include<iostream>
#include<string>
using namespace std;
int main(){
string n;
while(cin>>n){
if(n=="peach")cout<<"apple";
else if(n=="apple")cout<<"peach";
else cout<<n;
if(n[n.size()-1]=='.')cout<<endl;
else cout<<" ";
}
return 0;
}