#include<iostream>
#include<vector>

using namespace std;

string in;

int main(){

  while(getline(cin,in)){
    in += '\n';
    vector<string> V;
    string str = "";
    for(int i = 0; i < in.length(); i++){
      if(in[i] >= 'a' && in[i] <= 'z')str += in[i];
      else{
	if(in != ""){
	  V.push_back(str);
	  str = "";
	  str += in[i];
	  V.push_back(str);
	  str = "";
	}
      }
    }
    if(in != ""){
      V.push_back(str);
      str = "";
    }
    for(int i = 0; i < V.size(); i++){
      if(V[i] == "apple") cout << "peach";
      else if(V[i] == "peach") cout << "apple";
      else cout << V[i];
    }
  }
  return 0;
}