#include <cstdio>
#include <cstring>

int main() {
    const char ap[] = "apple";
    const char pe[] = "peach";
    char in[30] = { 0 };

    while (scanf("%s", &in) != EOF) {
        bool ise = in[5] == '.';
        in[5] = '\0';
        if (!strcmp(in, ap)) {
            printf(pe);
        } else if (!strcmp(in, pe)) {
            printf(ap);
        } else {
            printf(in);
        }

        if (ise) {
            printf(".");
            printf("\n");
            break;
        } else {
            printf(" ");
        }

        for (int i = 0; i < 30; ++i) {
            in[i] = 0;
        }
    }

    return 0;
}