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

int main()
{
     string str;
     bool flag = false;
     while (cin >> str) {
	  if (str == "apple") str = "peach";
	  else if (str == "peach") str = "apple";
	  else if (str == "peach.") str = "apple.";
	  else if (str == "apple.") str = "peach.";

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

     return 0;
}