#include <iostream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <string>
#include <algorithm>
#define CHAR_NUM 1001
#define NUM 5
using namespace std;

int main(void) {
    char str[30] = {0};
    char ans[CHAR_NUM];
    
    while(scanf("%s", str) != EOF) {
        if(!(strcmp(str, "apple"))) {
            strcpy(str, "peach");
        } else if(!(strcmp(str, "peach"))) {
            strcpy(str, "apple");
        } else if(!(strcmp(str, "apple."))) {
            strcpy(str, "peach.");
        } else if(!(strcmp(str, "peach."))) {
            strcpy(str, "apple.");
        }
        strcat(ans, str);
        int len = (int)strlen(ans);
        ans[len] = ' ';
    }
    cout << ans << endl;
    
    return(0);
}