#include<stdio.h>
#include<iostream>
#include<stdlib.h>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include<algorithm>
#include<functional>

using namespace std;


string str;

void input(){

}

int main(void) {
	int i = 0;
	while (cin >> str) {
		if (i != 0) {
			cout << " ";
		}
		i++;
		if (str == "peach") {
			cout << "apple";
		}
		else {
			if (str == "peach.") {
				cout << "apple.";
			}
			else {
				if (str == "apple") {
					cout << "peach";
				}
				else {
					if (str == "apple.") {
						cout << "peach.";
					}
					else {
						cout << str;
					}
				}
				
			}
		}
		
	}


	cout << endl;
	return 0;
}