s = eval(input())

t = s[0]

for i in range(1, len(s)):

    if s[i] == t:

        print('Bad')

        exit()

    t = s[i]



print('Good')

s = eval(input())

t = s[0]

for i in range(1, 4):

    if t == s[i]:

        print('Bad')

        exit(0)

    t = s[i]



print('Good')
s = eval(input())
t = s[0]
for i in range(1, len(s)):
    if s[i] == t:
        print("Bad")
        exit()
    t = s[i]
print("Good")

s = eval(input())
t = s[0]
for i in range(1, 4):
    if t == s[i]:
        print("Bad")
        exit(0)
    t = s[i]
print("Good")

-for i in range(1, len(s)): -    if s[i] == t: +for i in range(1, 4): +    if t == s[i]: -        exit() +        exit(0)