#include<iostream>
#include<string>
using namespace std;
int main(){
  int a = 0;
  string c;
  while(cin>>c){
    if(a!=0) cout << ' ';
    if(c=="apple"||"apple."){
      if(c=="apple") c = "peach";
      if(c=="apple.") c = "peach.";
      cout << c;
      a++;
      continue;
    }
    else if(c=="peach"||"peach."){
      if(c=="peach") c = "apple";
      if(c=="peach.") c = "apple.";
      cout << c;
      a++;
      continue;
    }
    else cout << c;
    a++; 
  }
  cout << endl;
  return 0;
}