#include <cstdio>
#include <cstring>
using namespace std;
int main(){
	char str[10];
	scanf("%s",&str);
        if(strcmp(str,"apple")==0){
			printf("peach");
		}
		else if(str=="peach"){
			printf("apple");
		}
		else{
			printf("%s",str);
		}
	while(scanf("%s",str)!=EOF){
		if(strcmp(str,"apple")==0||strcmp(str,"apple.")==0){
			if(strcmp(str,"apple")==0){printf(" peach");}
			if(strcmp(str,"apple.")==0){printf(" peach.");}
		}
		else if(strcmp(str,"peach")==0||strcmp(str,"peach.")==0){
			if(strcmp(str,"peach")==0){printf(" apple");}
			if(strcmp(str,"peach.")==0){printf(" apple.");}
		}
		else{
			printf(" %s",str);
		}
	}
	printf("\n");
	return 0;
}