#include<stdio.h>
#include<string.h>

int main(void){
	char str[1050],*p;
	scanf("%[^\n]",str);
	p=strtok(str," ");
	while(p!=NULL){
		if( strncmp( p,"apple",5)==0){
			printf("peach");
			printf("%s ",(p+5));
		}else if( strncmp( p,"peach",5)==0){
			printf("apple");
			printf("%s ",(p+5));
		}else {
			printf("%s ",p);
		}
		p=strtok(NULL," ");
	}
	return 0;
}