#include<iostream>
#include<string>

using namespace std;

int main(){

  string in;
  int i = 0;

  while(cin >> in){
    if(i != 0) cout << " ";
    if(in == "apple"){
      cout << "peach";
    }else if(in == "peach"){
      cout << "apple";
    }else if(in =="apple."){
      cout << "peach.";
    }else if(in == "peach."){
      cout << "apple.";
    }else{
      cout << in;
    }
    i++;
  }

  cout << endl;


  return 0;
}