#include<iostream>
#include<string>
#include<sstream>
int main()
{
	std::string str;
	std::getline(std::cin, str);
	std::istringstream ss(str);
	for (int i = 0;; i++)
	{
		std::string word;
		if (!(ss >> word))
		{
			break;
		}
		auto index = word.find("apple");
		if (index != std::string::npos)
		{
			word.replace(index, index + 5, "peach");
		}
		else
		{
			index = word.find("peach");
			if (index != std::string::npos)
			{
				word.replace(index, index + 5, "apple");
			}
		}
		if (i != 0)
		{
			std::cout << ' ';
		}
		std::cout << word;
	}
	std::cout << std::endl;
	return 0;
}
