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



Sample input:
3776


Sample output:
Bad

Submission status: Accepted

Solution code:
# using main() makes code faster from the point of view of "access to variables in global name-space"
# def main():

# for i, a in enumerate(iterable)
# q, mod = divmod(a, b)
# divmod(x, y) returns the tuple (x//y, x%y)
# manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc127_f
import sys
sys.setrecursionlimit(10**7)
from itertools import accumulate, combinations, permutations # https://docs.python.org/ja/3/library/itertools.html
from math import factorial
def factorize(n):
    """return the factors of the Arg and count of each factor
    
    Args:
        n (long): number to be resolved into factors
    
    Returns:
        list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
    """
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct
def combinations_count(n, r):
    # faster than the following code
    # def combinations_count(n, r):
    #     return factorial(n) // (factorial(n - r) * factorial(r))
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]
    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot
    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
    return result
def combination_with_repetition_count(n, r):
    return combinations_count(n + r - 1, r)
from collections import deque, Counter # https://docs.python.org/ja/3/library/collections.html#collections.deque
from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest # https://docs.python.org/ja/3/library/heapq.html
from copy import deepcopy, copy # https://docs.python.org/ja/3/library/copy.html
from operator import itemgetter 
# ex1: List.sort(key=itemgetter(1))
# ex2: sorted(tuples, key=itemgetter(1,2))
from functools import reduce
from fractions import gcd # Deprecated since version 3.5: Use math.gcd() instead.
def gcds(numbers):
    return reduce(gcd, numbers)
def lcm(x, y):
    return (x * y) // gcd(x, y)
def lcms(numbers):
    return reduce(lcm, numbers, 1)

# first create factorial_list
# fac_list = mod_factorial_list(n)
INF = 10 ** 18
MOD = 10 ** 9 + 7
modpow = lambda a, n, p = MOD: pow(a, n, p) # Recursive function in python is slow!
def modinv(a, p = MOD):
    # evaluate reciprocal using Fermat's little theorem:
    # a**(p-1) is identical to 1 (mod p) when a and p is coprime
    return modpow(a, p-2, p)
def modinv_list(n, p = MOD):
    if n <= 1:
        return [0,1][:n+1]
    else:
        inv_t = [0,1]
        for i in range(2, n+1):
            inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
        return inv_t
def modfactorial_list(n, p = MOD):
    if n == 0:
        return [1]
    else:
        l = [0] * (n+1)
        tmp = 1
        for i in range(1, n+1):
            tmp = tmp * i % p
            l[i] = tmp
        return l
def modcomb(n, k, fac_list = [], p = MOD):
    # fac_list = modfactorial_list(100)
    # print(modcomb(100, 5, modfactorial_list(100)))
    from math import factorial
    if n < 0 or k < 0 or n < k: return 0
    if n == 0 or k == 0: return 1
    if len(fac_list) <= n:
        a = factorial(n) % p
        b = factorial(k) % p
        c = factorial(n-k) % p
    else:
        a = fac_list[n]
        b = fac_list[k]
        c = fac_list[n-k]
    return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
def modadd(a, b, p = MOD):
    return (a + b) % MOD
def modsub(a, b, p = MOD):
    return (a - b) % p
def modmul(a, b, p = MOD):
    return ((a % p) * (b % p)) % p
def moddiv(a, b, p = MOD):
    return modmul(a, modpow(b, p-2, p))


# initialize variables and set inputs
#initialize variables
    # to initialize list, use [0] * n
    # to initialize two dimentional array, use [[0] * N for _ in range(N)]
# set inputs
    # open(0).read() is a convenient method:
    # ex) n, m, *x = map(int, open(0).read().split())
    #     min(x[::2]) - max(x[1::2])
    # ex2) *x, = map(int, open(0).read().split())
    #     don't forget to add comma after *x if only one variable is used
# calculate and output
    # output pattern
    # ex1) print(*l) => when l = [2, 5, 6], printed 2 5 6

# # set test data
# sys.stdin = open('sample.txt') # for test

# functions used
r = lambda: sys.stdin.readline().strip() #single: int(r()), line: map(int, r().split())
R = lambda: list(map(int, r().split())) # line: R(), lines: [R() for _ in range(n)]
Rmap = lambda: map(int, r().split())

# set inputs
S = str(r())

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print("Bad")
else:
    print("Good")
# if __name__ == '__main__':
#     main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
def resolve():
    s = list(input())
    prev = '-1'
    for i in s:
        if i == prev:
            print("Bad")
            return
        prev = i
    print("Good")

resolve()

Submission status: Accepted

Solution code:
S=int(input())

Thou=S//1000
tmp=S-Thou*1000
Hund=tmp//100
tmp=tmp-Hund*100
Ten=tmp//10
One=tmp%10

if Thou==Hund:
  print("Bad")
else:
  if Hund == Ten:
    print("Bad")
  else:
    if Ten==One:
      print("Bad")
    else:
      print("Good")

Submission status: Accepted

Solution code:
s = input()
x = s[0]
flag = True
for i in range(1, 4):
    if x == s[i]:
        flag = False
        break
    
    x = s[i]

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

Submission status: Accepted

Solution code:
s=input()
if((s[0]==s[1])|(s[1]==s[2])|(s[2]==s[3])):
  print('Bad')
else:
  print('Good')

Submission status: Accepted

Solution code:
s = input()
print(['Good', 'Bad'][(s[0] == s[1]) or (s[2] == s[1]) or (s[2] == s[3])])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

result = 'Good'
if s[0] == s[1]:
    result = 'Bad'
if s[1] == s[2]:
    result = 'Bad'
if s[2] == s[3]:
    result = 'Bad'

print(result)

Submission status: Accepted

Solution code:
S = int(input())
S1=S%10
S2=(S%100-S1)/10
S3=(S%1000-S2*10-S1)/100
S4=(S-S3*100-S2*10-S1)/1000
#print("{}{}{}{}".format(S1,S2,S3,S4))
if S1==S2 or S2==S3 or S3==S4:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
s=input()
n = list(map(str, s))
if n[0] == n[1] or n[1] == n[2] or n[2] == n[3]:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
n = int(input())
now = n // 1000
n %= 1000
flag = 1
for i in range(3):
  if now == n // 10**(2-i) and flag == 1:
    print('Bad')
    flag = 0
  now = n // (10**(2-i))
  n %= 10**(2-i)
if flag == 1:
  print('Good')

Submission status: Accepted

Solution code:
import sys
S = list(input())

for i in range(3):
    if S[i] == S[i+1]:
        print("Bad")
        sys.exit(0)
print("Good")

Submission status: Accepted

Solution code:
S = list(input())
tmp = S[0]
for i in range(1,len(S)):
    if tmp == S[i]:
        print("Bad")
        exit()
    tmp = S[i]

print("Good")

Submission status: Accepted

Solution code:
import sys
S = input()

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

Submission status: Accepted

Solution code:
str=input()
n=len(str)

flag=1
for i in range(n-1):
    if (str[i] == str[i+1]):
        flag=0

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

if flag==0:
    print('Bad')

Submission status: Accepted

Solution code:
def main():
    S = [c for c in input()]
    ans = 'Good'
    pre = 'a'
    for c in S:
        if pre == c:
            ans = 'Bad'
            break
        pre = c
    print(ans)


main()

Submission status: Accepted

Solution code:
y=11
z=0

for x in input():
    if x==y:
        z=1
    y=x
        
if z==1:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
s=int(input())
a=s//1000
b=s//100-a*10
c=s//10-b*10-a*100
d=s-c*10-b*100-a*1000
if a==b or b==c or c==d:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = int(input())

a = S % 10
b = int((S % 100) / 10)
c = int(S % 1000 / 100)
d = int(S / 1000)

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

Submission status: Accepted

Solution code:
S=input()
flag=True
for i in range(3):
    if S[i]==S[i+1]:
        flag=False
if flag:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

Solution code:
s = input()
ans = "Good"

for i in range(len(s)-1):
  if s[i] == s[i + 1]:
    ans = "Bad"
print(ans)

Submission status: Accepted

Solution code:
S = list(input())
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        ans = False
        break
    else:
        ans = True
print("Good") if ans else print("Bad")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = ns()
a = ''

for i in range(len(s)):
    if s[i] == a:
        print('Bad')
        exit()
    a = s[i]

print('Good')

Submission status: Accepted

Solution code:
s = input()
p = None
bad = False
for i in s:
  if i == p:
    print("Bad")
    bad = True
    break
  p = i
if not bad:
  print("Good")

Submission status: Accepted

Solution code:
S = input()

flg = False
for i in range(3):
    if S[i] == S[i+1]:
        flg =True

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

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

Solution code:
a = input()
for i in range(len(a)-1):
    if a[i]==a[i+1]:
        print('Bad')
        exit()
print('Good')

Submission status: Accepted

Solution code:
# A
if __name__=='__main__':
    S = input()
    answer = 'Good'
    for i in range(3):
        if S[i]==S[i+1]:
            answer ='Bad'
            break
    print(answer)

Submission status: Accepted

Solution code:
S = input()
n=0
b=0
while n<3 :
    if S[n]==S[n+1]:
        b=1
    n+=1
if b==1:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
import sys

fin = sys.stdin.readline
num = str(fin()).split()[0]

readable = True
prev_num = num[0]
for i in range(1, 4):
    cur_num = num[i]
    if prev_num == cur_num:
        readable = False
    prev_num = cur_num

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

Submission status: Accepted

Solution code:
import math
import numpy as np
import re


def inputs(): return [int(s) for s in input().split()]


def main():
    s = input()
    buf = '-1'
    for st in s:
        if buf == st:
            return 'Bad'
        buf = st
    return 'Good'


if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

judge = True
for i in range(3):
	if S[i] == S[i+1]:
		judge = False
		
if judge:
	print("Good")
else:
	print("Bad")

Submission status: Accepted

Solution code:
i = input()

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

Submission status: Accepted

Solution code:
a=input()
ans=0
for i in range(3):
    if a[i]==a[i+1]:
        ans=1
print("GBoaodd"[ans::2])

Submission status: Accepted

Solution code:
S=input()
flag=0
for i,s in enumerate(S):
    if i==0:
        pre=s
    if i!=0 and pre==s:
            flag=1
    
    pre=s
if flag==0:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

Solution code:
from sys import exit, stdin
S = stdin.readline().rstrip()
for i, c in enumerate(S):
    if i == 0:
        continue
    if S[i] == S[i-1]:
        print('Bad')
        exit()
print('Good')

Submission status: Accepted

Solution code:
s = input()
for i in range(0, 3):
    if s[i] == s[i+1]:
        print("Bad")
        exit()
    
print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
S = list(input())
count = 0
for i in range(len(S) - 1):
    if S[i] == S[i+1]:
        count +=1
        
if count >= 1:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = input()
answer = "Good"
for i in range(len(S)-1):
    if S[i] == S[i+1]:
        answer = "Bad"
print(answer)

Submission status: Accepted

Solution code:
from sys import stdin
input=stdin.readline().rstrip().split()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = int(input())
sen = s//1000
hyaku = s//100 - sen*10
juu = s//10 - sen*100 - hyaku*10
iti = s - sen*1000 - hyaku*100 - juu*10

if (sen==hyaku)or(hyaku==juu)or(juu==iti):
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = input()
flag = True

for i in range(len(S)-1):
    if S[i] == S[i+1]:
        flag = False
    else:
        pass

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

Submission status: Accepted

Solution code:
M = input()
S = list(M)

result = "Good"
for str in S:
    if M.count(str+str) > 0:
        result = "Bad"
        break
print(result)

Submission status: Accepted

Solution code:
s = input()
prev = 'x'
ans = None

for i in range(4):
#    print(s[i])
    if prev == s[i]:
        ans = True
        break
    else:
        ans = False
    prev = s[i]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
from sys import stdin

if __name__ == '__main__':
    s = stdin.readline().rstrip()
    flag = 1
    a = s[0]
    if s[0] == s[1]:
        flag = 0
    elif s[1] == s[2]:
        flag = 0
    elif s[2] == s[3]:
        flag = 0
    else:
        pass
    
    if flag == 1:
        print("Good")
    else:
        print("Bad")

Submission status: Accepted

Solution code:
S = input()
i = 'a'
f = 0
for a in S:
  if i == a:
    f = 1
    break  
  i = a
if f == 1:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

Solution code:
import sys
input1 = input()
l_input1 = list(input1)

for i in range(0,len(l_input1)-1):
    if l_input1[i] == l_input1[i+1]:
        print("Bad")
        sys.exit()
print("Good")

Submission status: Accepted

Solution code:
code = input()
a = code[0]
b = code[1]
c = code[2]
d = code[3]
if a==b or b==c or c==d:
  ans = "Bad"
else:
  ans = "Good"
print(ans)

Submission status: Accepted

Solution code:
import numpy as np

S = input()

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

Submission status: Accepted

Solution code:
S = input()
b = ''
for s in S:
    if s == b:
        print('Bad')
        exit()
    b = s
print('Good')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

for i in range(len(S)-1):
  if S[i]==S[i+1]:
    print('Bad')
    exit(0)

print('Good')

Submission status: Accepted

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

a, b, c, d = S[0], S[1], S[2], S[3]

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

Submission status: Accepted

Solution code:
s = input()
x1 = s[:2]
x2 = s[1:3]
x3 = s[2:4]

if len(list(x1)) == len(set(x1)) and len(list(x2)) == len(set(x2)) and len(list(x3)) == len(set(x3)):
    print("Good")
else:
    print("Bad")

Submission status: Accepted

Solution code:
line=list(input())

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

Submission status: Accepted

Solution code:
a=input()
tmp=a[0]
flag=False
for i in range(1,len(a)):
    if a[i]==tmp:
        flag=True
    tmp=a[i]
if flag:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
a = input()
b = False
for i in range(len(a)-1):
  if a[i] == a[i+1]:
    b = True
if b:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def ii(): return stdin.readline()
num = ii()
def do():
    for i in range(1,4):
        if num[i] == num[i - 1]:
            return "Bad"
    else:
        return "Good"
print(do())

Submission status: Accepted

Solution code:
import fractions
import numpy as np
import os
import sys

s=input()

flag=True
for i in range(1,4):
    if(s[i-1]==s[i]):
        flag=False

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

Submission status: Accepted

Solution code:
N=list(input())
S=4
flag=0
for i in range(3):
    if N[i]==N[i+1]:
        flag=1
if flag==1:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
s=input()
r="Good"
for i in range(len(s)-1):
  if s[i]==s[i+1]:
    r="Bad"
    break
print(r)

Submission status: Accepted

Solution code:
S = input()

is_bad = False

for i in range(0, 10):
    if str(i)+str(i) in S:
        is_bad = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

for n in range(3):
    if s[n] == s[n+1]:
        print('Bad')
        break
else:
    print('Good')

Submission status: Accepted

Solution code:
s = input()
count= 0

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

Submission status: Accepted

Solution code:
n = int(input())
n1 = n//1000
n2 = (n-n1*1000)//100
n3 = (n-n1*1000-n2*100)//10
n4 = (n-n1*1000-n2*100-n3*10) 

if n1 == n2 or n2 == n3 or n3 == n4:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3


def solv(s):
    if s[0] == s[1]:
        return 'Bad'
    if s[1] == s[2]:
        return 'Bad'
    if s[2] == s[3]:
        return 'Bad'
    return 'Good'


if __name__ == '__main__':

    s = input()

    ans = solv(s)

    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
bad = 0
in_in = int(input())
four = in_in // 1000
three = (in_in % 1000) // 100
two = (in_in % 100) // 10
one = in_in % 10
if(four == three) :
  bad += 1
if(three == two) :
  bad += 1
if(two == one) :
  bad += 1
if(bad >= 1) : 
  print("Bad")
else :
  print("Good")

Submission status: Accepted

Solution code:
s = list(input())
for i in range(3):
	if s[i]!=s[i+1]:
		pass		
	else:
		print("Bad")
		exit()
print("Good")

Submission status: Accepted

Solution code:

S = input()

flag=0


for i in range(len(S)-1):
    if(S[i+1]==S[i]):
        flag=1
        print("Bad")
        break

if(flag!=1):
    print("Good")

Submission status: Accepted

Solution code:
str = input()
flag = 0
#print(type(str))
#print(len(str))
for i in range(len(str) - 1):
    if str[i] == str[i + 1]:
        flag = 1

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

Submission status: Accepted

Solution code:
from copy import copy

s = list(input())

before = ''
for chara in s:
    if chara == before:
        print('Bad')
        exit()
    before = copy(chara)
print('Good')

Submission status: Accepted

Solution code:
S = input()
 
pre = ""
for s in S:
    if s is pre:
        print("Bad")
        exit()
    pre = s
 
print("Good")

Submission status: Accepted

Solution code:
import sys
s = input()
for i,x in enumerate(s):
    if i!=0 and s[i]==s[i-1]:
        print("Bad")
        sys.exit()
print("Good")

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque
import itertools as ite
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
S=list(input())

res='Good'
pre=-1
for s in S:
  if pre==-1:
    pre=s
    continue
  elif pre==s:
    res='Bad'
    break
  else:
    pre=s
    
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
for i in range(0, len(N) - 1):
    if N[i] == N[i+1]:
        print('Bad')
        exit(0)
print('Good')

Submission status: Accepted

Solution code:
s = input()
flag = False
for i in range(len(s)-1):
    if int(s[i]) == int(s[i+1]):
        flag = True

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
flag= True
for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        print("Bad")
        flag = False
        break
        
if flag:
    print("Good")

Submission status: Accepted

Solution code:
S = list(input())
a = "Good"
for i in range(len(S)-1):
  if S[i] == S[i+1]:
    a = "Bad"
print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
pa = input()
x = ""
out = False
for i in pa:
    if x == i:
        out = True
    x = i
if out:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S=str(input())

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

Submission status: Accepted

Solution code:
S = input()

for i in range(len(S)-1):
    if S[i] == S[i+1]:
        print("Bad")
        exit()
print("Good")

Submission status: Accepted

Solution code:
a = input()
wlist = []
ans = "Good"
prev = "A"

for i in a:
    if i == prev:
        ans = "Bad"
    prev = i


print(ans)

Submission status: Accepted

Solution code:
S=input()

tmp=""
for i in range(len(S)):
	if tmp==S[i]:
		print("Bad")
		break
	else:
		tmp=S[i]
	if i==len(S)-1:
		print("Good")

Submission status: Accepted

Solution code:
# 2019 6/22
# ABC 131 A Security

is_good = True

S = input()


for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        is_good = False

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

Submission status: Accepted

Solution code:
S = raw_input()
char_list = list(S)

flag = "Good"
for i in range(len(char_list) - 1):
    if char_list[i] == char_list[i+1]:
        flag = "Bad"

print(flag)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = [int(i) for i in list(input())]

D = False
for i, num in enumerate(S):
    if i == 0:
        pre = num
    else:
        if num == pre:
            D = True
        pre = num

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

Submission status: Accepted

Solution code:
S = input()

pre = ''
for c in S:
    if pre == c:
        print('Bad')
        break
    pre = c
else:
    print('Good')

Submission status: Accepted

Solution code:
S = list(map(int,list(input())))
flag = True
for i in range(3):
    if S[i] == S[i+1]:
        flag = False
if flag:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

Solution code:
S = input()
a = S[0]
ans = 0
for i in range(1,4):
    if a == S[i]:
        ans += 1
    a = S[i]
if ans == 0:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

def is_good(S):
    flag = 0
    s_tmp = 0
    for s in S:
        if s == s_tmp:
            flag += 1
        s_tmp = s
    return flag

flag = is_good(S)

if flag > 0:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = input()
n = len(S)

is_hard = False

for i in range(1, n):
    if S[i-1] == S[i]:
        is_hard = True
    
if is_hard:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:

S = input()

a = [0 for i in range(10)]

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

Submission status: Accepted

Solution code:
def input_from_console():
    s= input().strip()
    return s


def solve(s):
    buffer = [0] * 10
    result = 'Good'
    prev = ''
    for item in s:
        if item == prev:
           result = 'Bad'
           break
        else:
            prev = item
    return result


def main():
    s = input_from_console()
    print(solve(s))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()

Submission status: Accepted

Solution code:
S = input()
tmp = ''
for s in S:
  if tmp == s:
    print('Bad')
    break
  tmp = s
else:
  print('Good')

Submission status: Accepted

Solution code:
number = list(map(int,list(input())))
#print(number)
if number[0] == number[1] or number[1] == number[2] or number[2] == number[3]:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
from sys import stdin

S = stdin.readline().rstrip()
before="aa"
for s in S:
  if before == s:
    print("Bad")
    exit()
  before = s
print("Good")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

S = list(input())

good = True
buf = ''
for c in S:
    if c == buf:
        good = False
    buf = c

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
N = list(input())
p = N[0]
for n in N[1:]:
  if p==n:
    print('Bad')
    break
  p = n
else:
  print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = input()
b = True
for l in range(len(i) - 1):
    if i[l] == i[l + 1]:
        print("Bad")
        b = False
        break
if b:
    print("Good")

Submission status: Accepted

Solution code:
s = list(input())
for i in range(3):
    if s[i + 1] == s[i]:
        print('Bad')
        exit(0)
print('Good')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

S = input()

previous = ''
isGood = True
for s in S:
    if previous == s:
        isGood = False
    previous = s
if isGood:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

Solution code:
S = input()
t = S[0]
p = "Good"
for i in range(1, len(S)):
    if t == S[i]:
        p="Bad"
        break
    t = S[i]
print(p)

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
s = input()
flag = 1
sc =  s[0]
for i in range(3):
  if sc == s[i+1]:
    flag = 0
    break
  else:
    sc = s[i+1]

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

Submission status: Accepted

Solution code:
import sys

S=input()
for i in range(len(S)-1):
  if S[i]==S[i+1]:
    print("Bad")
    sys.exit()
    
print("Good")

Submission status: Accepted

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

a = 'Good'
prev = ''
for i in S:
    if prev == i:
        a = 'Bad'
    prev = i

print(a)

Submission status: Accepted

Solution code:
S = input()
ans = "Good"

for i in range(len(S)-1):
  if S[i] == S[i+1]:
    ans = "Bad"
    break
  

print(ans)

Submission status: Accepted

Solution code:
import sys
listS=list(input())
for i in range(3):
  if listS[i]==listS[i+1]:
    print("Bad")
    sys.exit()
print("Good")

Submission status: Accepted

Solution code:
S = input()
a = S[0]
b = S[1]
c = S[2]
d = S[3]
if a == b or b == c or c == d:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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