#include <iostream>
#include <cstdio>
#include <sstream>

using namespace std;

int main()
{
  string str, result;
  getline(cin, str);
  for (int i = 0; i < str.size(); i++) {
    if (str.substr(i, 5) == "peach") {
      result += "apple";
      i += 4;
    } else if (str.substr(i, 5) == "apple") {
      result += "peach";
      i += 4;
    } else {
      result += str[i];
    }
  }
  cout << result << endl;
  return 0;
}