import sys
s=input().strip()
stack=[]
k=0
for i in s:
if i=="a":
stack.append(i)
elif i=="b":
if not stack:
k+=1
break
else:
stack.pop()
print("Good" if k==0 and not stack else "Bad")

京公网安备 11010502036488号