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