#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  string s;
  vector<string> ans;
  while (cin >> s) {
    size_t pos;
    pos = s.find("apple");
    if (pos != string::npos) {
      s.replace(pos, 5, "peach");
      ans.emplace_back(s);
      continue;
    }
    pos = s.find("peach");
    if (pos != string::npos) {
      s.replace(pos, 5, "apple");
      ans.emplace_back(s);
      continue;
    }
    ans.emplace_back(s);
  }
  for (int i = 0; i < (int)ans.size(); i++) {
    cout << ans[i] << " \n"[i + 1 == (int)ans.size()];
  }

  return 0;
}
