#include<iostream>
#include<cstdio>
using namespace std;

bool chara(char a){
  return ( a>='a' && a<='z');
}

int main(){
  char str[1025];
  int pos;
  string ans,tmp;

  while(fgets(str,1025,stdin)!=NULL){
    ans.clear();
    pos = 0;
    while(1){
      tmp.clear();
      while(chara(str[pos]))tmp.push_back(str[pos++]);
      
      if(tmp == "apple")ans += "peach";
      else if(tmp == "peach")ans += "apple";
      else ans += tmp;

      if(str[pos] == '\n')break;
      ans += str[pos];
      pos++;
    }
    cout << ans << endl;
  }  
}