#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cstring>
#include <functional>

using namespace std;

#define REP(i,a,b) for((i)=(a);(i)<(int)(b);(i)++)
#define rep(i,n) REP(i,0,n)
// BEGIN CUT HERE
#define foreach(itr,c) for(typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
// END CUT HERE

int main(){
  int i,j,k,n;
  string str;
  vector<string> in;

  while(cin >> str) in.push_back(str);
  in[(int)in.size()-1].erase((int)in[(int)in.size()-1].size()-1);
  rep(i,in.size()){
    if(in[i] == "apple"){
      in[i] = "peach";
      continue;
    }
    if(in[i] == "peach") in[i] = "apple";
  }
  rep(i,in.size()){
    cout << in[i];
    (i == in.size()-1) ? cout << "." << endl : cout << " ";
  }

  return 0;
}