s1 = input()
s2 = ''
count = 0
for i in range(len(s1)):
if s1[i] == 'е' or s1[i] == 'e':
count += 1
if count == 3 or count == 4:
s2 += s1[i].upper()
continue
s2 += s1[i]
print(s2)
s1 = input()
s2 = ''
count = 0
for i in range(len(s1)):
if s1[i] == 'е' or s1[i] == 'e':
count += 1
if count == 3 or count == 4:
s2 += s1[i].upper()
continue
s2 += s1[i]
print(s2)