#include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	string s;
	while(cin>>s){
		//if(s=="0") break;
		if(s.find("apple")==0) s.replace(0,5,"peach");
		else if(s.find("peach")==0) s.replace(0,5,"apple");
		cout<<s<<" ";
	}
	cout<<endl;
}