#include <cstdio>
using namespace std;

int main(){
	char str[1000];
	char app[6] = "apple", pea[6] = "peach";
	bool output, first;
	
	first = true;
	while((scanf("%s", str)) != EOF){
		output = false;
		if(!first) printf(" ");
		first = false;
		
		
		for(int i = 0; i < 5; i++){
			if(app[i] != str[i]) break;
			
			if(i + 1 == 5 && (str[5] == 0 || str[5] == '.')){
				printf("peach");
				if(str[5] == '.') printf(".");
				output = true;
			}
		}
		if(!output){
			for(int i = 0; i < 5; i++){
				if(pea[i] != str[i]) break;
				
				if(i + 1 == 5 && (str[5] == 0 || str[5] == '.')){
					printf("apple");
					if(str[5] == '.') printf(".");
					output = true;
				}
			}
		}
		if(!output){
			printf("%s", str);
		}
	}
	printf("\n");
	
	return 0;
}