#include<iostream>
#include<string>
#include<vector>

using namespace std;

vector<string> split(string&);
void StringHandle(string&);
bool space(char);
bool not_space(char);

int main(){
  string str;
  vector<string> Str;

  getline(cin, str);
  Str = split(str);

  for(string::size_type i=0; i<Str.size(); ++i){
    if(Str[i] == "apple")
      Str[i] = "peach";
    else if(Str[i] == "peach")
      Str[i] = "apple";
  }

  for(string::size_type i=0; i<Str.size()-2; ++i)
    cout << Str[i] << " ";
  cout << Str[Str.size()-2] << "." << endl;

  return 0;
}

vector<string> split(string& str){
  string _str;
  vector<string> Str;
  string::iterator i, j;

  j = str.begin();
  while(i < str.end() || j < str.end()){
    i = find_if(j, str.end(), not_space);
    j = find_if(i, str.end(), space);
    copy(i, j, back_inserter(_str));
    StringHandle(_str);
    Str.push_back(_str);
    _str.clear();
  }
  return Str;
}

void StringHandle(string& s){
  if(s[s.size()-1] < 'a' || s[s.size()-1] > 'z')
    s = s.substr(0, s.size()-1);
}

bool space(char c){
  return (isspace(c));
}

bool not_space(char c){
  return (!isspace(c));
}