S=eval(input())

print(("Good" if S[0]!=S[1]!=S[2]!=S[3] else "Bad"))
a,b,c,d=eval(input())

print(("Good" if a!=b!=c!=d else "Bad"))
S = eval(input())
print(("Good" if S[0] != S[1] != S[2] != S[3] else "Bad"))

a, b, c, d = eval(input())
print(("Good" if a != b != c != d else "Bad"))

-S = eval(input()) -print(("Good" if S[0] != S[1] != S[2] != S[3] else "Bad")) +a, b, c, d = eval(input()) +print(("Good" if a != b != c != d else "Bad"))