#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
using namespace std;
int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;}
string itos(int x){stringstream ss;ss<<x;return ss.str();}
int main(){
string n,tmp;
getline(cin,n);
for(int i=0;i<n.size();i++){
	if(n[i]!=' ')tmp.push_back(n[i]);
	else{
	if(tmp.find("peach")!=-1)cout<<"apple ";
	else if(tmp.find("apple")!=-1)cout<<"peach ";
	else cout<<tmp<<" ";
	tmp.clear();
	}
}
	if(tmp.find("peach")!=-1)cout<<"apple.\n";
	else if(tmp.find("apple")!=-1)cout<<"peach.\n";
	else cout<<tmp<<"\n";
}