#include <iostream>
using namespace std;

int main() {
  string str;
  string ret;
  
  bool flag = false;
  while( cin >> str ) {
    if( flag ) ret += " ";
    
    flag = true;
    
    if( str.substr(0, 5) == "apple" ) {
      str = "peach" + str.substr(5, str.size()-5);
    } else if( str == "peach" ) {
      str = "apple" + str.substr(5, str.size()-5);
    }
    ret += str;
  }

  cout << ret << endl;
  
  return 0;
}