#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <sstream>
#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;



int main(void){

string bun,wk;
vector<string> bun2;
	getline(cin, bun );	

	stringstream buf(bun);
	while(buf >> wk){
		int i=0;
		bun2.push_back(wk);
	}	

	
	rep(i,bun2.size()){
		if(bun2[i]=="apple") wk="peach";
		else if(bun2[i]=="apple.") wk="peach.";
		else if(bun2[i]=="peach") wk="apple";
		else if(bun2[i]=="peach.") wk="apple.";
		else wk = bun2[i];
		
		cout << wk << (i!=bun2.size()? " ":"\n");
	}	
	return 0;
	
	
}