#include <iostream>
#include <map>
#include <algorithm>
#include <cstdio>
#include <string>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;

void RepStr(string& str, const string& from, const string& to){
   string::size_type pos = 0;
 
  while(pos = str.find(from, pos), pos != string::npos) {
     str.replace(pos, from.length( ), to);
     pos += to.length();
   }
}


int main(void){

string bun;

	getline(cin, bun );	

	RepStr(bun, " apple ", " $A2PPL2E ");
	RepStr(bun, " apple.", " $A2PPL2E.");
	RepStr(bun, " peach ", " apple ");
	RepStr(bun, " peach.", " apple.");
	RepStr(bun, "$A2PPL2E", "peach");
	
	cout << bun;
	return 0;
	
	
}