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

int main(){
  char c;
  int k=0;
  char b[1001];
  while(scanf("%c",&c)){
    b[k]=c;
    if(b[k]=='\n')break;
    k++;
  }
  for(int i=0;i<k-5;i++){
    if(b[i]=='a'&&b[i+1]=='p'&&b[i+2]=='p'&&b[i+3]=='l'&&b[i+4]=='e'){
      b[i]='p';b[i+1]='e';b[i+2]='a';b[i+3]='c';b[i+4]='h';
    }else if(b[i]=='p'&&b[i+1]=='e'&&b[i+2]=='a'&&
	     b[i+3]=='c'&&b[i+4]=='h'){
      b[i]='a';b[i+1]='p';b[i+2]='p';b[i+3]='l';b[i+4]='e';
    }
  }
  k=0;
  while(1){
    cout<<b[k];
    if(b[k]=='\n')break;
    k++;
  }
  return 0;
}