#include<iostream>
#include<string>
using namespace std;
int main(){
  string str;
  int ve,we;
  while(1){
    ve=0,we=0;
    cin>>str;
    if(str[str.size()-1]=='.'){
      if(str=="peach."){
	str="apple.";
	cout<<str<<endl;
	ve++;
      }if(str=="apple."){
	str="peach.";
	cout<<str<<endl;
	we++;
      }if(we==0 && ve==0)
      cout<<str<<endl;
      break;
    }
    if(str=="peach"){
      str="apple";
      cout<<str<<" ";
      ve++;
    }
    if(str=="apple" && ve==0){
      str="peach";
      cout<<str<<" ";
      we++;
    }if(we==0 && ve==0){
      cout<<str<<" ";
    }  
  }
  return 0;
}