//Apple and Peach
#include<bits/stdc++.h>
using namespace std;

vector<string> v;

int main(){
  string s, tmp;
  getline(cin, s);
  stringstream ss(s);
  while(getline(ss, tmp, ' ')){
    v.push_back(tmp);
  }
  for(int i=0; i<v.size(); i++){
    if(i==v.size()-1){
      if(v[i]=="apple.")v[i]="peach.";
      else if(v[i]=="peach.")v[i]="apple.";
    }
    if(v[i]=="apple")v[i]="peach";
    else if(v[i]=="peach")v[i]="apple";
  }
  for(int i=0; i<v.size(); i++){
    cout<<v[i];
    if(i!=v.size()-1)cout<<' ';
    else cout<<endl;
  }
  return 0;
}