#include<cstdio>
#include<cstring>
#include<algorithm>
#include<functional>
#include<vector>
#include<stack>
#include<queue>
#include<iostream>
using namespace std;
int main(void)
{
	char s[1001];
	while(scanf("%s",s)!=EOF) {
		if(s[strlen(s)-1]=='.') cout<<s<<endl;
		else {
			if(strcmp(s,"peach")==0) 
				strcpy(s,"apple");
			else if(strcmp(s,"apple")==0) 
				strcpy(s,"peach");
			cout<<s<<" ";
		}
	}
}