import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;

void main()
{
	auto str = readln.split;
	foreach (ref s; str) {
		if (s.length < 5) continue;
		if (s[0..5] == "apple") s = "peach" ~ s[5..$];
		else if (s[0..5] == "peach") s = "apple" ~ s[5..$];
	}
	str.join(" ").writeln;
}