1 2 3 4 5 6 7 8
t = int(input()) for i in range(t): s = input() if "101" in s or "010" in s: print("Good") else: print("Bad")