tmp = gets.split(' ')
tmp.each{|s|
  next if s.gsub!(/apple/,'peach')
  next if s.gsub!(/peach/,'apple')
  next if s.gsub!(/apple./,'peach.')
  next if s.gsub!(/peach./,'apple.')
}

puts tmp.join(' ')

