Problem:
 Score : 100 points    Problem Statement  The door of Snuke's laboratory is locked with a security code.  The security code is a 4 -digit number. We say the security code is hard to enter when it contains two consecutive digits that are the same.  You are given the current security code S . If S is hard to enter, print Bad ; otherwise, print Good .      Constraints   S is a 4 -character string consisting of digits.         Input  Input is given from Standard Input in the following format:  S       Output  If S is hard to enter, print Bad ; otherwise, print Good .        Sample Input 1 3776      Sample Output 1 Bad  The second and third digits are the same, so 3776 is hard to enter.       Sample Input 2 8080      Sample Output 2 Good  There are no two consecutive digits that are the same, so 8080 is not hard to enter.       Sample Input 3 1333      Sample Output 3 Bad       Sample Input 4 0024      Sample Output 4 Bad

Solution (Python):

import sys

L = list(input())
for i in range(len(L)):
    for j in range(len(L)):
        if (i != j) and (abs(i-j) == 1) and (L[i] == L[j]):
            print("Bad")
            sys.exit()
print("Good")

Solution (Python):
S = list(input())
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')

Solution (Python):
S = input()

a = int(S[0]) - int(S[1])
b = int(S[1]) - int(S[2])
c = int(S[2]) - int(S[3])

if a != 0 and b != 0 and c != 0:
    print("Good")
else:
    print("Bad")

Solution (Python):
S = input()
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print('Bad')
else:
    print('Good')

Solution (Python):
inputs = input()

pre_num = "x"
for num in inputs:
    if pre_num == num:
        print("Bad")
        exit()
    pre_num = num

print("Good")

Solution (Python):
s=input()
f=-1
b=' '
l=len(s)
if l==4:
	f=0
	for i in range(l):
		if(s[i]<'0' or s[i]>'9'):
			f=-1
			break;
		elif(s[i]==b):
			f=1
			break;
		else:
			b=s[i]
if(f==-1):
	print('Illegal')
elif(f==1):
	print('Bad')
else:
	print('Good')

Solution (Python):

s = list(str(input()))
flag = False
for i in range(4):
    if 0 <= i and i <= 2:
        if s[i] == s[i+1]:
            flag = True

if flag == True:
    print("Bad")
else:
    print("Good")

Solution (Python):
s = input()
bg = False
for i in [0,1,2]:
  if s[i] ==s [i+1]:
    bg = True
    break
if bg:
  print("Bad")
else:
  print("Good")

Solution (Python):


code =input()

for i in range(0, 9) :
    for p in range(0, 3) :
        if code[p] == str(i) and code[p+1] == str(i):
            print("Bad")
            exit()

print("Good")
exit()

Solution (Python):
check =0
list = list(input())

for i in range(len(list)-1):
    
    if (list[i+1] == list[i]):
        check = 1
if (check==1):
    print("Bad")
else:
    print("Good")

Solution (Python):
S = input()

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print("Bad")
else:
    print("Good")

Solution (Python):
code = input()
flg = "Good"
for i in range(3):
  if code[i:i+1] == code[i+1:i+2]:
    flg = "Bad"
print(flg)

Solution (Python):
a = input()
for i in range(1, len(a)):
    if a[i] == a[i-1]:
        print("Bad")
        exit()
print("Good")

Solution (Python):
pw = input()

if(pw[0]==pw[1] or pw[1]==pw[2] or pw[2] ==pw[3]):
    print("Bad")
    
else:
    print("Good")

Solution (Python):
S = int(input())
if (int(S / 100) % 11) * (int((S % 1000) / 10) % 11) * ((S % 100) % 11) == 0:
  print("Bad")
else:
  print("Good")

Solution (Python):
S = str(input())
cnt = 0
for i in range(1, 4):
    cnt+=1
    if S[i] == S[i-1]:
        print('Bad')
        break
    elif cnt == 3:
        print('Good')

Solution (Python):
S = str(input())
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print('Bad')
else:
    print('Good')

Solution (Python):
s = input()
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
  print("Bad")
else:
  print("Good")

Solution (Python):
S = str(input())
s = list(S)

if s[0] == s[1]:
    print("Bad")
elif s[1] == s[2]:
        print("Bad")
elif s[2] == s[3]:
        print("Bad")
else:
        print("Good")

Solution (Python):
from collections import Counter

S = input()

out = 'Good'
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        out = 'Bad'
        break
print(out)

Solution (Python):
s = input()
if s[0] != s[1] and s[1] != s[2] and s[2]!=s[3]:
    print("Good")
else:
    print("Bad")

Solution (Python):
n = list(input())
flag = 1
for i in range(1,len(n)):
    if n[i-1] == n[i]:
        print("Bad")
        flag = 0
        break
if flag:
    print("Good")

Solution (Python):
import sys
input = sys.stdin.readline

s = input()
for i in range(3):
    if s[i] in s[i+1]:
        print('Bad')
        sys.exit()
print('Good')

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

S = input()
if S[0] == S[1] or S[1]==S[2] or S[2]==S[3]:
    print('Bad')
else:
    print('Good')

Solution (Python):
s = input()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
    print("Bad")
else:
    print("Good")

Solution (Python):
n=int(input())
a=n//1000
b=(n//100)%10
c=(n//10)%10
d=n%10
 
if a==b:
  print('Bad')
elif b==c:
  print('Bad')
elif c==d:
  print('Bad')
else:
  print('Good')

Solution (Python):
S=[int(s) for s in list(input())]
ans=0
for i in range(1,len(S)):
    ans=max(ans,S[i]==S[i-1])
print(('Good','Bad')[ans])

Solution (Python):
S = list(input())

if S[0] == S[1]:
  print("Bad")
elif S[1] == S[2]:
  print("Bad")
elif S[2] == S[3]:
  print("Bad")
else:
  print("Good")

Solution (Python):



from math import *

def main():
    import sys
    sys.dont_write_bytecode = True
    sys.setrecursionlimit(10000000)
    from sys import stdin, stdout, stderr
    input = stdin.readline

    
    

    

    import os
    import math, itertools, operator
    from math import factorial as fact
    from operator import itemgetter, attrgetter
    from itertools import permutations, combinations
    from functools import reduce, lru_cache
    
    
    from fractions import gcd
    from fractions import Fraction as Frac

    inf = float('inf')

    def lcm(a, b):
        return a * b // gcd(a,b)

    def perm(a, b):
        import scipy.special
        return scipy.special.perm(a, b, exact = True)

    def comb(a, b):
        import scipy.special
        return scipy.special.comb(a, b, exact = True)

    def dfact(n):
        import scipy.special
        return scipy.special.factorial2(n, exact = True)

    def prod(l):
        return reduce(operator.mul, l)

    def input_ints(func = input, sep = None, conv = int):
        return list(map(conv, func().split(sep = sep)))

    
    if 1:
        def dprint(*args, **kwargs):
            kwargs['file'] = sys.stderr
            import inspect
            frame = inspect.currentframe().f_back
            print('[' + os.path.basename(frame.f_code.co_filename)
                    + ':' + str(frame.f_lineno) + ']', *args, **kwargs)
    else:
        def dprint(*args, **kwargs):
            pass


    


    S = input()
    dprint(S)
    for i in range(len(S) - 1):
        dprint(S[i])
        if S[i] == S[i+1]:
            print('Bad')
            return
    print('Good')


if __name__ == '__main__':
    main()

Solution (Python):



from math import *

def main():
    import sys
    sys.dont_write_bytecode = True
    sys.setrecursionlimit(10000000)
    from sys import stdin, stdout, stderr
    input = stdin.readline

    
    

    

    import os
    import math, itertools, operator
    from math import factorial as fact
    from operator import itemgetter, attrgetter
    from itertools import permutations, combinations
    from functools import reduce, lru_cache
    
    
    from fractions import gcd
    from fractions import Fraction as Frac

    inf = float('inf')

    def lcm(a, b):
        return a * b // gcd(a,b)

    def perm(a, b):
        import scipy.special
        return scipy.special.perm(a, b, exact = True)

    def comb(a, b):
        import scipy.special
        return scipy.special.comb(a, b, exact = True)

    def dfact(n):
        import scipy.special
        return scipy.special.factorial2(n, exact = True)

    def prod(l):
        return reduce(operator.mul, l)

    def input_ints(func = input, sep = None, conv = int):
        return list(map(conv, func().split(sep = sep)))

    if os.environ.get('GOROOT') is None:
        def dprint(*args, **kwargs):
            kwargs['file'] = sys.stderr
            import inspect
            frame = inspect.currentframe().f_back
            print('[' + os.path.basename(frame.f_code.co_filename)
                    + ':' + str(frame.f_lineno) + ']', *args, **kwargs)
    else:
        def dprint(*args, **kwargs):
            pass


    


    S = input()
    dprint(S)
    for i in range(len(S) - 1):
        dprint(S[i])
        if S[i] == S[i+1]:
            print('Bad')
            return
    print('Good')


if __name__ == '__main__':
    main()

Solution (Python):
a,b,c,d = input()
if a==b or b==c or c==d:
    print ("Bad")
else:
    print ("Good")

Solution (Python):
s = input()
flag = 0

for i in range(3):
    if s[i] == s[i+1]:
        print('Bad')
        break
    flag += 1

if flag == 3:
    print('Good')

Solution (Python):
s = input()

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
  print('Bad')
else:
  print('Good')

Solution (Python):
S=list(input())

if S[0]==S[1]:
  print('Bad')
elif S[1]==S[2]:
  print('Bad')
elif S[2]==S[3]:
  print('Bad')
else:
  print('Good')

Solution (Python):
s = input()

t = [x for x in s]

if (t[0] == t[1]) or (t[1] == t[2]) or (t[2] == t[3]) :
    print ("Bad")
else :
    print ("Good")

Solution (Python):
s = input()
for a, b, in zip(s, s[1:]):
    if a == b:
        print("Bad")
        exit()
print("Good")

Solution (Python):

S = input()
ret = "Good"
for i in range(3):
    if S[i] == S[i+1]:
        ret = "Bad"

print(ret)

Solution (Python):
S = input()
list1 = list(map(int,S))

a = list1[0]
b = list1[1]
c = list1[2]
d = list1[3]

if a == b:
    print("Bad")
elif b == c:
    print("Bad")
elif c == d:
    print("Bad")
else:
   print("Good")

Solution (Python):

import sys


def solve(S: str):
    prev = ''
    for s in S:
        if s == prev:
            print('Bad')
            break
        else:
            prev = s
    else:
        print('Good')
        
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
s = input()

flg = True
for s1, s2 in zip(s, s[1:]):
    if s1 == s2:
        flg = False
        break

print('Good' if flg else 'Bad')

Solution (Python):
s = input()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  print("Bad")
else:
  print("Good")

Solution (Python):
S = input()

s = [int(S[i])-int(S[i+1]) for i in range(len(S)-1)]

print("Good" if 0 not in s else "Bad")

Solution (Python):
try:
    s = input()
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print('Bad')
    else:
        print('Good')
except EOFError:
    pass

Solution (Python):
S = list(map(int, list(input())))

tmp = S.pop(0)
for i in S:
    if tmp == i:
        print('Bad')
        break
    tmp = i
else:
    print('Good')

Solution (Python):
code = input()
ans = "Good"
if code[0] == code[1] or code[1] == code[2] or code[2] == code[3]:
    ans = "Bad"
print(ans)

Solution (Python):
S = input()
for i in range(3):
    if S[i] == S[i + 1]:
        print("Bad")
        exit()
print("Good")

Solution (Python):
num = input()
 
n='X'
ans='Good'
for i in range(4):
  if n==num[i]:
    ans='Bad'
    break
  else:
    n=num[i]
print(ans)

Solution (Python):
S = list(input())
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  print('Bad')
else:
  print('Good')

Solution (Python):



s = input()
f = True
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        f = False
        break
if f:
    print("Good")
else:
    print("Bad")

Solution (Python):

import sys


def solve(S: str):
    for i in range(len(S) - 1):
        if S[i] == S[i+1]:
            return 'Bad'
    return 'Good'



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = str(next(tokens))  
    print(solve(S))

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
prev = S[0]
for s in S[1:]:
  if s == prev:
    print("Bad")
    exit()
  prev = s
    
print("Good")

Solution (Python):

S=input()
count=0
for i in range(3):
  if S[i]==S[i+1]:
    count=1
if count==1:
  print("Bad")
else:
  print("Good")

Solution (Python):
x = input()
def samenum(string):
  for i in range(3):
    if string[i] == string[i+1]:
        return "Bad"
        quit()
  return "Good"
 
print(samenum(x))

Solution (Python):
x = input()
def samenum(string):
  for i in range(3):
    if string[i] == string[i+1]:
        return "Bad"
        quit()
  return "Good"

print(samenum(x))

Solution (Python):
s = list(input())
for i in range(3):
    if s[i] == s[i+1]:
        print("Bad")
        break
else:
    print("Good")

Solution (Python):
def print_ans(s):
  """
  Parameters
  --------------
  >>> print_ans("2276")
  Bad
  >>> print_ans("3776") 
  Bad
  >>> print_ans("8080")
  Good
  """
  if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print("Bad")
  else:
    print("Good")
  

def main():
  s = input()
  print_ans(s)


if __name__ == '__main__':
  main()

Solution (Python):
string = input()
judge = 0
for i in range(len(string)-1):
	if(string[i] == string[i+1]):
		judge = 1
if judge == 1:
	print("Bad")
else:
	print("Good")

Solution (Python):
password = input()

for i in range(3):
    if password[i] == password[i+1]:
        print('Bad')
        break
    elif i == 2:
        print('Good')

Solution (Python):
n = input()
c=1 
for i in range(len(n)-1):
    if(n[i]==n[i+1]):
        c=0 
        break 
if(c==1):
    print("Good")
else :
    print("Bad")

Solution (Python):
n = input()
if n[0] != n[1] and n[1] != n[2] and n[2] != n[3]:
  print("Good")
else:
  print("Bad")

Solution (Python):
a = raw_input()
if a[0] == a[1]:
    print "Bad"
elif a[1] == a[2]:
    print "Bad"
elif a[2] == a[3]:
    print "Bad"
else:
    print "Good"

Solution (Python):
s = input()
m = 0
for i in range(3):
  if s[i] == s[i+1]:
    m += 1
if m == 0:
  print("Good")
else:
  print("Bad")

Solution (Python):
s = input()
m = 0
for i in range(3):
  if s[i] == s[i+1]:
    m += 1
  else:
    pass
if m == 0:
  print("Good")
else:
  print("Bad")

Solution (Python):
s = input()
a,b,c,d = s[0],s[1],s[2],s[3]

if a==b or b==c or c==d: print("Bad")
else: print("Good")

Solution (Python):
i = input()
for x in range(3):
    if i[x]==i[x+1]:
        print("Bad")
        exit()
print("Good")

Solution (Python):
i = input()
for x in range(3):
    if i[x]==i[x+1]:
        print("Bad")
        exit()
print("Good")

Solution (Python):
i = input()
for x in range(3):
    if i[x]==i[x+1]:
        print("Bad")
        exit()
print("Good")

Solution (Python):
S = input()
print("Bad") if S[0] == S[1] or S[1] == S[2] or S[2] == S[3] else print("Good")

Solution (Python):
S=input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
    print('Bad')
else:
    print('Good')

Solution (Python):
S=input()
if S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:
 print("Bad")
else:
 print("Good")

Solution (Python):
a = input()

if a[0] == a[1] or a[1] == a[2] or a[2] == a[3]:
  print("Bad")
else:
  print("Good")

Solution (Python):
import re
import sys
import math
import itertools
from sys import stdin

def main():
    """
     解答をこちらに
    """
    s = input()
    last_c = None
    for c in s:
        if c  == last_c:
            print("Bad")
            return
        last_c = c
    print("Good")


if __name__ == "__main__":
    main()

Solution (Python):
s = input()
switch = False
for i in range(0, 3):
  if s[i] == s[i + 1]:
    switch = True
if switch:
  print('Bad')
else:
  print('Good')

Solution (Python):
key_no = input()
ret = 'Good'
for i in range(len(key_no)-1):
  if key_no[i] == key_no[i+1]:
    ret = 'Bad'
    break  
print(ret)

Solution (Python):
def check():
  n = input()
  for i in range(len(n)-1):
    if n[i] == n[i+1]:
      print("Bad")
      return  
  print("Good")
  return

if __name__ == "__main__":
  check()

Solution (Python):

import sys
codes = input()

pre = ''
for code in codes:
  if pre == code:
    print('Bad')
    sys.exit()
  pre = code
print('Good')

Solution (Python):
a = input()

if a[0] == a[1]:
  print("Bad")
else:
  if a[1] == a[2]:
    print("Bad")
  else:
    if a[2] == a[3]:
      print("Bad")
    else:
      print("Good")

Solution (Python):
S = input()
for i in range(len(S)-1):
    if S[i]is S[i+1]:
        print('Bad')
        break
else:
    print('Good')

Solution (Python):

import sys

s=raw_input()
for i in range(1,4):
 if s[i]==s[i-1]:
  print 'Bad'
  sys.exit()
print 'Good'

Solution (Python):
password = list(input())
if password[0] == password[1] or password[1] == password[2] or password[2] == password[3]:
  print("Bad")
else:
  print("Good")

Solution (Python):
s =  str(input())
 
flag = True
for i in range(3):
    if s[i] == s[i+1]:
        flag = False
 
if flag:
    print("Good")
else:
    print("Bad")

Solution (Python):
S = input()
print("Bad" if any(S[i] == S[i+1] for i in range(3)) else "Good")

Solution (Python):
S  = list(input())
flag = False
for i in range(1,len(S)):
    if S[i-1] == S[i]:
        flag = True
        
if flag:
    print('Bad')
else:
    print('Good')

Solution (Python):
import sys
S = input()
beforeChar = 'a'
for s in S:
    if (beforeChar == s):
        print('Bad')
        sys.exit()
    beforeChar = s

print('Good')

Solution (Python):
S = str(input())
ans = 'Good'
for i in range(3):
    if S[i] == S[i+1]:
        ans = 'Bad'
print(ans)

Solution (Python):
a = input()
lena = len(a)
bad = False
aft = 0

for i in a:
    bef = i
    if bef==aft:
        bad = True
        break
    else:
        aft=bef
if bad==True:
    print('Bad')
else:
    print('Good')

Solution (Python):
S=input()

list_s=list(S)

if list_s[0]==list_s[1]:
 print('Bad')
elif list_s[1]==list_s[2]:
 print('Bad')
elif list_s[2]==list_s[3]:
 print('Bad')
else:
 print('Good')

Solution (Python):
S = list(input())

prev = S[0]
ans = 'Good'

for i in range(1, len(S)):
  if S[i] == prev:
    ans = 'Bad'
  
  prev = S[i]
  
print(ans)

Solution (Python):
S = list( input() )
answer = 'Good'
for i in range(4 - 1):
    if S[i] == S[i+1]:
        answer = 'Bad'
print(answer)

Solution (Python):
S = input()

l = list(S)

f = False

for i in range(1, len(l)):
    if l[i] == l[i-1]:
        f = True
        break

if f:
    print('Bad')
else:
    print('Good')

Solution (Python):
a = input()
for i in range(3):
  if(a[i] == a[i+1]):
    b = False
    break
  elif(a[i] != a[i+1]):
    b = True
if(b == False):
  print("Bad")
else:
  print("Good")

Solution (Python):
S = int(input())
t = [0]*4
frag = True
for i in range(4):
    t[i] = S % 10
    S = int(S/10)

for i in range(3):
    if t[i] == t[i+1]:
        frag = False

if frag:
    print("Good")
else:
    print("Bad")

Solution (Python):
S=input()
B=[]
for i in range(4):
  if i<=2:
    if S[i]==S[i+1]:
      B.append(1)
if len(B)!=0:
  print("Bad")
else:
  print("Good")

Solution (Python):
s = input()
isBad = False

for i in range(len(s) - 1):
  if s[i] == s[i+1]:
    isBad = True
    
if isBad :
  print("Bad")
else: 
  print("Good")

Solution (Python):
s = input()
index = 0
bef = ""
answer = "Good"
while index < len(s):
    if s[index]!=bef:
        bef = s[index]
    else:
        answer = "Bad"
    index+=1
print(answer)

Solution (Python):
x=input()
def goodorbad(n):
    for i in range (0,3):
        if n[i]==n[i+1]:
            return "Bad\n"
    return "Good\n"
print (goodorbad(x))

Solution (Python):
S = input()
A = "Good"
for i in range (3):
    if S[i] == S[i + 1]:
        A = "Bad"
print(A)

Solution (Python):
S=input()
for i in range(3):
  if S[i]==S[i+1]:
    print("Bad")
    exit()
print("Good")

Solution (Python):
S=input()
f=True
for i in range(3):
  f=f and S[i]!=S[i+1]
if f:
  print("Good")
else:
  print("Bad")