#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  string line;
  getline(cin,line);
  vector<int> v;
  int p=0;      
  while((p=line.find("peach",p)) != -1) {
     v.push_back(p);
     p++;
  }
  while((p=line.find("apple")) != -1) {
    line.replace(p,5,"peach");
  }
  FOR(i,v) {
    line.replace(*i,5,"apple");
  }
  cout << line << endl;
}