 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
 
 int main()
 {
   string str;
   while(cin>>str)
   {
     if(str=="apple") str="peach";
     else if(str=="peach") str="apple";
     else if(str=="apple.") str="peach.";
     else if(str=="peach.") str="apple.";
     if(str[str.length()-1]=='.') cout<<str<<endl;
     else cout<<str<<" ";             
   }
   //cout<<endl;
   //while(1);
   return 0;
 }

 
 