
import std.stdio;
import std.string;

void main() {
  char[] line = cast(char[]) readln.chomp;
  for(int i = 0; i < line.length - 5; i++) {
    char[] str = line[i..(i + 5)];
    if (str == "apple") line[i..(i + 5)] = cast(char[])"peach";
    else if (str == "peach") line[i..(i + 5)] = cast(char[])"apple";
  }
  writeln(line);
}