#include <string>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <utility>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <iterator>
#include <sstream>

using namespace std;
template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template<class T>
void splitstr(const string &s, vector<T> &out)
{
    istringstream in(s);
    out.clear();
    copy(istream_iterator<T>(in), istream_iterator<T>(), back_inserter(out));
}

vector<string> splitstr( string s, string c )
{
	vector<string> ret;
	for( int i=0, n; i <= (int)s.length(); i=n+1 ){
		n = s.find_first_of( c, i );
		if( n == string::npos ) n = s.length();
		string tmp = s.substr( i, n-i );
		ret.push_back(tmp);
	}
	return ret;
}

string join(vector<string>& vs,string c)
{
	if(vs.empty()) return "";
	string ret;
	for (int i = 0; i < (int)vs.size() - 1; i++){
		ret += vs[i] + c;
	}
	return ret + vs[vs.size()-1];
}

int main()
{
	string s; getline(cin,s);
	vector<string> spl;
	splitstr(s,spl);
	for (int i = 0; i < (int)spl.size(); i++){
		vector<string> v = splitstr(spl[i],".");
		for (int j = 0; j < (int)v.size(); j++){
			if(string::npos != v[j].find("peach")) v[j] = "apple";
			else if(string::npos != v[j].find("apple")) v[j] = "peach";
		}
		spl[i] = join(v,".");
	}

	printf("%s\n",join(spl," ").c_str());
	return 0;
}