s = input() def getresult(s): stack = [] # 看字符a,b是否能完全配对 for c in s: if c == 'a': stack.append(c) elif c == 'b': if len(stack) > 0 and stack[-1] == 'a': stack.pop() else: return 'Bad' return 'Good' if len(stack) == 0 else 'Bad' print(getresult(s))