#include <iostream>
#include <string>
#include <vector>

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;


vector<string> split(const string &str, char delim){
  vector<string> res;
  size_t current = 0, found;
  while((found = str.find_first_of(delim, current)) != string::npos){
    res.push_back(string(str, current, found - current));
    current = found + 1;
  }
  res.push_back(string(str, current, str.size() - current));
  return res;
}


int main()
{
	string s;
	getline(cin,s);
	vector<string> _s = split(s,' ');

	rep(i,_s.size())
	{
		if(_s[i] == "apple") _s[i] = "peach";
		else if(_s[i] == "apple.") _s[i] = "peach.";
		else if(_s[i] == "peach") _s[i] = "apple";
		else if(_s[i] == "peach.") _s[i] = "apple.";
	}

	rep(i,_s.size()-1) 
	{
		cout << _s[i] << " ";
	}
	cout << _s[_s.size()-1] << endl;
	
	return 0;
}