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

void peach_apple( string& str )
{
    string peach = "peach";
    string apple = "apple";

    for( int j = 0; j < str.size(); j++ )
    {
        int k1 = j, k2 = j, s1 = 0, s2 = 0;
        for( int i = 0; i < 5; i++ )
        {
            if( peach[i] == str[k1] )
            {
                k1++;
                s1++;
                if( s1 == 5 )
                {
                    str[k1-1] = 'e'; str[k1-2] = 'l'; str[k1-3] = 'p'; 
                    str[k1-4] = 'p'; str[k1-5] = 'a';
                    break;
                }
            }
            if( apple[i] == str[k2] )
            {
                k2++;
                s2++;
                if( s2 == 5 )
                {
                    str[k2-1] = 'h'; str[k2-2] = 'c'; str[k2-3] = 'a'; 
                    str[k2-4] = 'e'; str[k2-5] = 'p';
                    break;
                }
            }
        }
    }
}

int main()
{
    string str;

    getline( cin , str );
    peach_apple( str );
    cout << str << endl;

    return 0;
}
