input = gets.chomp
word = input.split(" ")
for num in 0..(word.length - 1) do
	if word[num].include?("peach") then
		print word[num].gsub("peach", "apple")
	elsif word[num].include?("apple") then
		print word[num].gsub("apple", "peach")
	else
		print word[num]
	end
 
	if num != word.length - 1 then
		print " "
	else
		puts ""
	end
end