#include<iostream>
#include<string>
#include<vector>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a; i ++)
int main(void){
  string str;
  bool used = false;
  string word[2] = {"apple","peach"};
  while(cin>>str){
    if(used)cout<<" ";
    used = true;
    if(str.size() < 5){
      cout<<str;
      continue;
    }
    //apple -> peach
    bool out = true;
    rep(i,min(str.size(),word[0].size())){
      if(str[i] != word[0][i])out = false;
    }
    if(out){
      rep(i,word[0].size())str[i] = word[1][i];
      cout<<str;
      continue;
    }
    //peach -> apple
    out = true;
    rep(i,min(str.size(),word[1].size())){
      if(str[i] != word[1][i])out = false;
    }
    if(out){
      rep(i,word[1].size())str[i] = word[0][i];
      cout<<str;
      continue;
    }
    cout<<str;
    
  }
}