a = gets.split
sw = {"apple" => "peach", "peach" => "apple", "Apple" => "Peach", "Peach" => "Apple", "APPLE" => "PEACH", "PEACH" => "APPLE" }
a.each_with_index {|ai,i|
	if ai[-1] == "." || ai[-1] == "," || ai[-1] == "!" || ai[-1] == "?" 
		if sw[ai[0..-2]]
			a[i] = sw[ai[0..-2]] + ai[-1]
		end
	elsif ai[-1] == "s" || ai[-1] == "S"
		if sw[ai[0..4]]
			a[i] = sw[ai[0..4]] + ai[-1]
			if a[i][-2..-1] != "es"
				a[i] = a[i].gsub!("s","es")
			end
		end
	elsif sw[ai]
		a[i] = sw[ai]
	end
}
puts a.join(" ")