Title: Apples and Peaches

Fukushima Prefecture is famous for its fruit production, particularly for its high production of peaches and apples. However, a mistake was made in a sales brochure, swapping the descriptions of apples and peaches.

Your task is to create a program that takes a single line of English text as input and outputs the same text with all instances of "apple" replaced by "peach" and all instances of "peach" replaced by "apple".

Input:
A single line of English text containing alphanumeric characters, spaces, and symbols. The length of the input string is at most 1000 characters.

Output:
Output the modified English text with "apple" and "peach" swapped.

Sample Input:
the cost of one peach is higher than that of one apple.

Output for the Sample Input:
the cost of one apple is higher than that of one peach.

# Buggy version:
w=str(input())
print(len(w))
for i in range(len(w)):
    if i>len(w):break
    if w[i]=="a" and w[i+1]=="p" and w[i+2]=="p" and w[i+3]=="l" and w[i+4]=="e":
        w=w[:i]+"peach"+w[i+5:]
        continue
    if w[i]=="p" and w[i+1]=="e" and w[i+2]=="a" and w[i+3]=="c" and w[i+4]=="h":
        w=w[:i]+"apple"+w[i+5:]
print(w)


# Fixed version:
w=str(input())
for i in range(len(w)):
    if i>len(w):break
    if w[i]=="a" and w[i+1]=="p" and w[i+2]=="p" and w[i+3]=="l" and w[i+4]=="e":
        w=w[:i]+"peach"+w[i+5:]
        continue
    if w[i]=="p" and w[i+1]=="e" and w[i+2]=="a" and w[i+3]=="c" and w[i+4]=="h":
        w=w[:i]+"apple"+w[i+5:]
print(w)

# Buggy version:
string=input()
print(string)
string1=string.replace('peach','tmp')
string2=string1.replace('apple','peach')
string3=string2.replace('tmp','apple')
print(string3)

# Fixed version:
string=input()
string1=string.replace('peach','tmp')
string2=string1.replace('apple','peach')
string3=string2.replace('tmp','apple')
print(string3)

# Buggy version:
s = input()
s.replace("apple", "temp")
s.replace("peach", "apple")
s.replace("temp", "apple");
print(s)

# Fixed version:
s = input()
s = s.replace("apple", "temp")
s = s.replace("peach", "apple")
s = s.replace("temp", "peach");
print(s)

# Buggy version:
from collections import deque

result = deque()
for _ in input().split():
    if   'apple' in _ : result.append(_.replace('peach', 'apple'))
    elif 'peach' in _ : result.append(_.replace('apple', 'peach'))
    else : result.append(_)
print(*result)

# Fixed version:
from collections import deque

result = deque()
for _ in input().split():
    if 'apple' in _ : 
        if _ == 'apple' : result.append('peach') 
        else : result.append(_.replace('apple', 'peach'))
    elif 'peach' in _ : 
        if _ == 'peach' : result.append('apple')
        else : result.append(_.replace('peach', 'apple'))
    else : result.append(_)
print(*result)

# Buggy version:
s = input().split()
ss = []
for w in s:
    a = w.find('apple')
    p = w.find('peach')
    if a != -1:
        w = w.replace('apple','peach')
    elif p != -1:
        w = w.replace('peach','apple')
    ss.append(word)
print(' '.join(ss))

# Fixed version:
s = input().split()
ss = []
for w in s:
    a = w.find('apple')
    p = w.find('peach')
    if a != -1:
        w = w.replace('apple','peach')
    elif p != -1:
        w = w.replace('peach','apple')
    ss.append(w)
print(' '.join(ss))

# Buggy version:
ans = []
for word in input().split():
    if "apple" in word:
        ans.append(word.replace("apple", "peach"))
    elif "peach" in word:
        ans.append(word.replace("peach", "apple"))
    else:
        ans.append(word)
print(*word)

# Fixed version:
ans = []
for word in input().split():
    if "apple" in word:
        ans.append(word.replace("apple", "peach"))
    elif "peach" in word:
        ans.append(word.replace("peach", "apple"))
    else:
        ans.append(word)
print(*ans)

# Buggy version:
inp = input()
tmp = inp.replace("apple", "XXX")
tmp = tmp.replace("pearch", "apple")
print(tmp.replace("XXX", "peach"))



# Fixed version:
inp = input()
tmp = inp.replace("apple", "XXX")
tmp = tmp.replace("peach", "apple")
print(tmp.replace("XXX", "peach"))

# Buggy version:
import re
s=input()
print(re.sub("peach","apple",s))



# Fixed version:
import re
s=input()
s=re.sub("peach","!!!!!",s)
s=re.sub("apple","peach",s)
s=re.sub("!!!!!","apple",s)
print(s)

# Buggy version:
print(input().replace('apple','peach'))


# Fixed version:
print(input().replace('apple','*').replace('peach','apple').replace('*','peach'))