#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <cstring>

using namespace std;


int main(){
	char c[6];
	int end=1;
	char ap[6]="apple";
	char pe[6]="peach";

	while(scanf("%c",&c[0])!=EOF){
		if(c[0]=='a'){
			for(int i=1; i<5; i++){
				end=scanf("%c",&c[i]);
				if(end==EOF){
					c[i]='\0';
					printf("%s", c);
					break;
				}
			}
			if(end==EOF)break;
			c[5]='\0';
			
			if(strcmp(c,ap)==0)printf("%s", pe);
			else printf("%s", c);
		}
		else if(c[0]=='p'){
			for(int i=1; i<5; i++){
				end=scanf("%c",&c[i]);
				if(end==EOF){
					c[i]='\0';
					printf("%s", c);
					break;
				}
			}
			if(end==EOF)break;
			c[5]='\0';
			
			if(strcmp(c,pe)==0)printf("%s", ap);
			else printf("%s", c);
		}
		else printf("%c",c[0]);
	}
	cout<<endl;
}