#!/usr/bin/ruby                                                                                                                                   
# -*- coding: utf-8 -*-                                                                                                                           

puts gets.chomp.gsub("peach", "\n").gsub("apple", "peach").gsub("\n", "apple")