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

int main()
{
  string str;
  cin >> str;
  if (str == "apple"){
    cout << "peach";
  }
  else if (str == "peach"){
    cout << "apple";
  }
  else {   
    cout << str;
  }
  while (cin >> str){

    if ((str == "apple") || (str == "apple.")){
      cout << " " << "peach";
  }
    else if ((str == "peach") || (str == "peach.")){
      cout << " " << "apple";
    }
    else {
      cout << " " << str;
    }
  }
  cout << "." << endl;
  return 0;
}