#include<bits/stdc++.h>
using namespace std;

int main(){
  string tmp;
  while(getline(cin,tmp),tmp.size()!=0){
    if(tmp.size()>=5){
      for(int i=0; tmp.size()-i>=5; ++i){
        if(tmp[i]=='a' && tmp[i+1]=='p' && tmp[i+2]=='p' && tmp[i+3]=='l' && tmp[i+4]=='e'){
          tmp[i]='p';tmp[i+1]='e';tmp[i+2]='a';tmp[i+3]='c';tmp[i+4]='h';
        }else if(tmp[i]=='p' && tmp[i+1]=='e' && tmp[i+2]=='a' && tmp[i+3]=='c' && tmp[i+4]=='h'){
          tmp[i]='a';tmp[i+1]='p';tmp[i+2]='p';tmp[i+3]='l';tmp[i+4]='e';
        }
      }
    }
    cout  << tmp << endl; 
  }  
}



