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

string str;
string s;
bool first = true;

void output(string out){
  static bool first = true;
  if(first)
    cout << out;
  else
    cout << " " << out;
  first = false;
}


void replace(int n){
  if(str.size() > 5){
    for( string::size_type i=5; i<str.size(); i++)
      s+=str[i];
  }
  output(s);
}


int main()
{

  while(cin >> str){
    string::size_type index = str.find( "apple" );
    string::size_type index2 = str.find( "peach" );
    if( index != string::npos ){
      s="peach";
      replace(index);
    }
    else if( index2 != string::npos ){
      s="apple";
      replace(index2);
    }
    else
      output(str);
  }
  cout << endl;  
  return 0;
}