#include <iostream>
#include <string>
using namespace std;

// 文字列 s の 文字列 before をすべて文字列 after に置き換える.
void f(string& s, const string& before, const string& after ){
	int pos = 0;
	while( (pos = s.find( before )) != string::npos ){
		s.replace( pos , before.size() , after );
	}
}

int main(){
	string s;
	getline(cin, s);
	f(s, "apple", "PEACH");
	f(s, "peach", "APPLE");
	for(int i=0 ; i < s.size() ; i++ ){
		if( 'A' <= s[i] && s[i] <= 'Z' ){
			s[i] = s[i] - 'A' + 'a';
		}
	}
	cout << s << endl;
}