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

int main(){
  char a,b,c,d,e,f;
  string s;
  while(scanf("%c",&a)!=EOF){
    if(a=='a'){
      scanf("%c%c%c%c%c",&b,&c,&d,&e,&f);
      if(b=='p'&&c=='p'&&d=='l'&&e=='e'&&('a'>=f||f>='z')){
	cout<<"peach"<<f;
      }else cout<<a<<b<<c<<d<<e<<f;
    }else if(a=='p'){
      scanf("%c%c%c%c%c",&b,&c,&d,&e,&f);
      if(b=='e'&&c=='a'&&d=='c'&&e=='h'&&('a'>=f||f>='z')){
	cout<<"apple"<<f;
      }else cout<<a<<b<<c<<d<<e<<f;
    }else cout<<a;
  }
  
  return 0;
}