a = gets.split
sw = {"apple" => "peach", "peach" => "apple", "Apple" => "Peach", "Peach" => "Apple", "APPLE" => "PEACH", "PEACH" => "APPLE" }
a.each_with_index {|ai,i|
	if sw[ai]
		a[i] = sw[ai]
	end
}
puts a.join(" ")