
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')


# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)



# slower version:

s = input()[::-1]



while True:

    if len(s) == 0:

        break

    if s[:7] == "remaerd":

        s = s[7:]

    elif s[:6] == "resare":

        s = s[6:]

    elif s[:5] == "maerd" or s[:5] == "esare":

        s = s[5:]

    else:

        print("NO")

        exit()



print("YES")

# optimized version of the same code:

import re



s = eval(input())



if re.fullmatch(r"(dream|dreamer|erase|eraser)+", s):

    print("YES")

else:

    print("NO")
s = input()[::-1]
while True:
    if len(s) == 0:
        break
    if s[:7] == "remaerd":
        s = s[7:]
    elif s[:6] == "resare":
        s = s[6:]
    elif s[:5] == "maerd" or s[:5] == "esare":
        s = s[5:]
    else:
        print("NO")
        exit()
print("YES")

import re

s = eval(input())
if re.fullmatch(r"(dream|dreamer|erase|eraser)+", s):
    print("YES")
else:
    print("NO")

-s = input()[::-1] -while True: -    if len(s) == 0: -        break -    if s[:7] == "remaerd": -        s = s[7:] -    elif s[:6] == "resare": -        s = s[6:] -    elif s[:5] == "maerd" or s[:5] == "esare": -        s = s[5:] -    else: -        print("NO") -        exit() -print("YES") +import re + +s = eval(input()) +if re.fullmatch(r"(dream|dreamer|erase|eraser)+", s): +    print("YES") +else: +    print("NO")