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

int main()
{
     string str;
     char apple[6] = "apple", peach[6] = "peach";
     bool flag = false;
     while (cin >> str) {
	  if (str.size() >= 5) {
	       string tmp;
	       for (int i = 0; i < 5; i++)
		    tmp += str[i];
	       if ((('a' <= str[5] && str[5] <= 'z') || ('A' <= str[5] && str[5] <= 'Z')) != true) {
		    if (tmp == "apple") {
			 for (int i = 0; i < 5; i++)
			      str[i] = peach[i];
		    }else if (tmp == "peach") {
			 for (int i = 0; i < 5; i++)
			 str[i] = apple[i];
		    }
	       }
	  }

	  if (flag) cout << " ";
	  cout << str;
	  flag = true;
     }
     cout << endl;

     return 0;
}