#include <cstdio>
#include <iostream>
#include <string>

using namespace std;

signed main()
{
    string s;
    while( cin >> s )
    {
        if( s == "peach" )
        {
            cout << "apple" << ' ';
        }
        else if( s == "peach." )
        {
            cout << "apple.";
        }
        else if( s == "apple" )
        {
            cout << "peach" << ' ';
        }
        else if( s == "apple." )
        {
            cout << "peach.";
        }
        else
        {
            cout << s << ' ';
        }
    }
    printf( "\n" );
    return 0;
}
