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

int main(void)
{
  string sentence[1000];
  int i=0;
  
  while(cin >> sentence[i]) i++;
  
  for(int i = 0 ; i < 1000 ; i++)
    {
      if(sentence[i] == "a" && sentence[i+1] == "p" && sentence[i+2] == "p"
	 && sentence[i+3] == "l" && sentence[i+4] == "e")
	{
	  sentence[i] == "p";
	  sentence[i+1] == "e";
	  sentence[i+2] == "a";
	  sentence[i+3] == "c";
	  sentence[i+4] == "h";
	}
      else if(sentence[i] == "p" && sentence[i+1] == "e" && sentence[i+2] == "a"
	 && sentence[i+3] == "c" && sentence[i+4] == "h")
	{
	  sentence[i] == "a";
	  sentence[i+1] == "p";
	  sentence[i+2] == "p";
	  sentence[i+3] == "l";
	  sentence[i+4] == "e";
	}
    }
  cout << sentence[0];
  for(int j = 1 ; j < i ; j++) cout << ' ' << sentence[j];
  cout << endl;
  return 0;
}