#include<iostream>
#include<string>
#include<sstream>
using namespace std;

int main(){
	string str;
	string word[1111];
	getline(cin,str);
	stringstream ss;
	int cou = 0;
	ss << str;
	while(!ss.eof()){
		string tmp;
		ss >> tmp;
		word[cou] = tmp;
		cou++;
	}
	for(int i=0;i<cou;i++){
		if(word[i] == "apple") cout << "peach";
		else if(word[i] == "peach") cout << "apple";
		else if(word[i] == "apple.") cout << "peach.";
		else if(word[i] == "peach.") cout << "apple.";
		else cout << word[i];
		if(i != cou-1) cout << " ";
	}
	cout << endl;
}