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:
import sys

S = input()

S = list(str(S))
for i in range(3):
    if S[i] == S[i+1]:
        result = "Bad"
        break
    else:
        result = "Good"
print(result)

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:
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 23 14:06:18 2019

@author: Enya
"""

S = input()
N1 = S[0]
N2 = S[1]
N3 = S[2]
N4 = S[3]

if N1==N2 or N2==N3 or N3==N4:
    print('Bad')
    
else:
    print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
spl = [0] * 4

for i in range(4):
    spl[i] = a % 10
    a = a // 10

flag = 0

for i in range(4-1):
    if(spl[i]==spl[i+1]):
        flag = 1

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

Submission status: Accepted

Solution code:
l = ['%d%d'%(i, i) for i in range(10)]
S = input()
if sum([S.count(i) for i in l]) > 0:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
s = list(input())

for i in range(4)[1:4]:
    if s[i-1] == s[i]:
        print("Bad")        
        break
else:
    print("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:
i=input()
lst = []
lst = [int(c) for c in str(i)]
#print(len(lst))
flag = 0

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

if flag != 1:
  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 = str(input())
for i in range(0,3):
    if S[i]==S[i+1]:
        print("Bad")
        exit()
print("Good")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Security
https://atcoder.jp/contests/abc131/tasks/abc131_a

"""
import sys


import re

def solve(S):
    m = re.search(r'(.)\1', S)
    if m:
        return 'Bad'
    return 'Good'


def main(args):
    S = input()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
def main():
	S = input()
	b = S[0]
	is_good = True
	for i in range(1, 4):
		if b == S[i]:
			is_good = False
		b = S[i]
	if is_good:
		print("Good")
	else:
		print("Bad")


if __name__ == '__main__':
	main()

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):
    """Return the number of selecting r pieces of items from n kinds of items.
    
    Args:
        n (long): number
        r (long): number
    
    Raises:
        Exception: not defined when n or r is negative
    
    Returns:
        long: number
    """
    # TODO: How should I do when n - r is negative?
    if n < 0 or r < 0:
        raise Exception('combinations_count(n, r) not defined when n or r is negative')
    if n - r < r: r = n - r
    if r < 0: return 0
    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 combinations_with_replacement_count(n, r):
    """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
    
    Args:
        n (long): number
        r (long): number
    
    Raises:
        Exception: not defined when n or r is negative
    
    Returns:
        long: number
    """
    if n < 0 or r < 0:
        raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
    elif n == 0:
        return 1
    else:
        return combinations_count(n + r - 1, r)
from collections import deque, Counter, defaultdict # 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

# functions used
r = lambda: sys.stdin.readline().strip()
R = lambda: list(map(int, r().split()))
Rfloat = lambda: list(map(float, r().split()))
Rtuple = lambda: tuple(map(int, r().split()))
Rmap = lambda: map(int, r().split())
# single int: int(r())
# single string: r()
# single float: float(r())
# line int: R()
# line string: r().split()
# line (str, int, int): [j if i == 0 else int(j) for i, j in enumerate(r().split())]
# lines int: [R() for _ in range(n)]

# set inputs

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

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

Submission status: Accepted

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



S = str(input())

chk = True
for i in range(10):
  if str(i)*2 in S:
    chk = False

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

Submission status: Accepted

Solution code:

from collections import defaultdict

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

def main():
    data = list(input())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s=input()
l=len(s)
c=0
for i in range(l-1):
    if s[i]==s[i+1]:
        c=1
        break

if c==0:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 23 09:53:22 2019

@author: Yamazaki Kenichi
"""

S = input()

flg = True
tmp = S[0]
for i in range(1,len(S)):
    if S[i] == tmp:
        flg = False
    tmp = S[i]
if flg:
    ans = 'Good'
else:
    ans = 'Bad'
print(ans)

Submission status: Accepted

Solution code:
S = str(input())

ans = 'Good'

for i in range(3):
	if S[i] == S[i+1]:
		ans = 'Bad'
		break

print(ans)

Submission status: Accepted

Solution code:
input_line = input()
last_c = ''
bad = False
for i in range(len(input_line)):
  c = input_line[i]
  if last_c == c:
    print('Bad')
    bad = True
    break
  last_c = c
if not bad:
  print('Good')

Submission status: Accepted

Solution code:
S = input()
bad = any(a == b for a, b in zip(S, S[1:]))
print('Bad' if bad else 'Good')

Submission status: Accepted

Solution code:
S = input()

S1 = S[0]
S2 = S[1]
S3 = S[2]
S4 = S[3]

flg = "Good"

if S1 == S2:
  flg = "Bad"
elif S2 == S3:
  flg = "Bad"
elif S3 == S4:
  flg = "Bad"

print(flg)

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:
S=list(str(input()))
ans=('Good')

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

Submission status: Accepted

Solution code:
def solve(s):
    n = len(s)
    for i in range(n-1):
        if s[i] == s[i+1]:
            return "Bad"
    return "Good"

s = input()
print(solve(s))

Submission status: Accepted

Solution code:
pas=input()

x1=pas[0]
x2=pas[1]
x3=pas[2]
x4=pas[3]

res='Good'
if x1==x2: res='Bad'
if x2==x3: res='Bad'
if x3==x4: res='Bad'

print(res)

Submission status: Accepted

Solution code:
s = input()

check = 0

for i in range(3):
    if s[i:i+1] == s[i+1:i+2]:
        check = 1

if check == 1:
    print('Bad')
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'
    break
print(flag)

Submission status: Accepted

Solution code:
a = int(input())
b = a//1000
c = (a//100)%10
d = (a//10)%10
e = a%10
cou = 0
if b is c:
  cou = cou + 1
elif c is d:
   cou = cou + 1
elif d is e:
   cou = cou + 1
else:
  print("Good")
if cou > 0:
  print("Bad")

Submission status: Accepted

Solution code:
s=input()
p=""
q=0
for i in s:
    if p==i:
        q=1
    p=i
if q==1:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
number = input()
s = number[0]

for i in range(1,4):
  if s == number[i]:
    print("Bad")
    exit()
  
  s = number[i]
  
print("Good")

Submission status: Accepted

Solution code:
def solve(S):
  return not any(x==y for x,y in zip(S, S[1:]))
print "Good" if solve(raw_input()) else "Bad"

Submission status: Accepted

Solution code:
n = input()
s = str(n)
a = list(map(int, s))
if a[0] == a[1]:
    result = "Bad"
elif a[1] == a[2]:
    result = "Bad"
elif a[2] == a[3]:
    result = "Bad"
else:
    result = "Good"
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())
k = 0
for i in range(3):
  if s[i] == s[i+1]:
    print('Bad')
    break
  else:
    k = k + 1
if k == 3:
  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=input()
flag=0
for i in range(3):
  if s[i]==s[i+1]:
    flag=1
    break
if flag==0:
  print("Good")
else:
  print("Bad")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

flg = True
for i in range(1, len(S)):
    if S[i] == S[i - 1]:
        flg = False
        break

if flg:
    print('{}'.format('Good'))
else:
    print('{}'.format('Bad'))

Submission status: Accepted

Solution code:
def main():
    s = input()
    print(hoge(s))


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

    return 'Good'


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# AC
from copy import copy

s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(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:
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 = int(input())
s1 = (S-S%1000)/1000
k1 = S - s1*1000
s2 = (k1-k1%100)/100
k2 = k1 - s2*100
s3 = (k2-k2%10)/10
s4 = S - (s1*1000 + s2*100 + s3*10)
 
if s1 == s2 or s2 == s3 or s3 == s4:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ans = 'Good'

a = []

for i in range(4):
    a.append(n%10)
    n //= 10

if a[0] == a[1] or a[1] == a[2] or a[2] == a[3]:
    ans = 'Bad'

print(ans)

Submission status: Accepted

Solution code:
import numpy as np
str = input()
S = list(str)
ans_flag = (S[0]==S[1]) or (S[1]==S[2]) or (S[2]==S[3]) 
if ans_flag:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = input()
print('Good' if all([S[i] != S[i-1] for i in range(1, len(S))]) else 'Bad')

Submission status: Accepted

Solution code:
S = input()

flag = False
for i in range(10):
    if str(i)*2 in S:
        flag = True

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

Submission status: Accepted

Solution code:
a = input()

def check():
  for i in range(3):
    if a[i] == a[i+1]:
      print("Bad")
      return 
  print("Good")

check()

Submission status: Accepted

Solution code:
import re;print(re.search(r'(.)\1',input())and'Bad'or'Good')

Submission status: Accepted

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

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:
a = 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()
print("Good" if s[0] != s[1] and s[1] != s[2] and s[2] != s[3] else "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:
# -*- coding: utf-8 -*-

#同じ数字が連続する箇所が存在するならBad, そうでなければGood

S = input()
jud = False

#もし4桁じゃなかったら×
if len(S) != 4:
    print("4桁でありません")

for i in range(0,3):
    if S[i] == S[i+1]:
        jud = True
    else:
        pass

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

Submission status: Accepted

Solution code:
import re;print('Bad'if any((lambda S:[re.search(str(i)*2,S)for i in range(10)])(input()))else 'Good')

Submission status: Accepted

Solution code:
def main():
    S = input()
    buf = ""
    for i in S:
        if i == buf:
            print("Bad")
            return 0
        buf = i
    print('Good')
    return 0
 
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
li = []
for ind,i in enumerate(S[:-1]):
    if(i==S[ind+1]):
        print('Bad')
        break
else:
    print('Good')

Submission status: Accepted

Solution code:
s=input();print('GBoaodd'[any(s[i]==s[i+1]for i in range(3))::2])

Submission status: Accepted

Solution code:
code = str(input())

for i, s in enumerate(code):
    if i != 0:
        if s == pre:
            print("Bad")
            exit()
    pre = s

print("Good")

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:
#ABC131-A

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return input()

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

  return 'Good'

print(main())

Submission status: Accepted

Solution code:
S = input()

result = (S[0] == S[1]) or (S[1] == S[2]) or (S[2] == S[3])

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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()
R=str(S)
L=list(map(int,R))
a=L[0]
b=L[1]
c=L[2]
d=L[3]
if a==b or  b==c  or c==d :
  print("Bad")
else:
  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()
    else:
        continue
 
print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

list_S = list(S)
list_S = [int(s) for s in list_S]

a = list_S[0]
hantei = 1
for i in list_S[1:]:
    if a == i:
        hantei = 0
    a = i
if hantei==0:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
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')

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()

result = "Good"
for i, ss in enumerate(s,0):
    if i == len(s) - 1:
        break
    if ss == s[i+1]:
        result = "Bad"

print(result)

Submission status: Accepted

Solution code:
S=input()

a=0
if (S[0]==S[1]):
    a=1
if(S[1]==S[2]):
    a=1
if(S[2]==S[3]):
    a=1

if (a==1):
    print("Bad")
if(a==0):
    print("Good")

Submission status: Accepted

Solution code:
S = input()

tmp = ""
result = 0

for i in S:
    if tmp==i:
      result += 1
    tmp = i

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

Submission status: Accepted

Solution code:
n = list(input())
ans = "ng"
for i in range(0,3):
  if n[i] == n[i+1]:
    ans = 'Bad'
    break
    
if ans=='Bad':
  print('Bad')
else:
  print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
lists = ["00", "11", "22", "33", "44", "55", "66", "77", "88", "99"]
a = input()

i = 0
for list in lists:
    if list in a:
        i += 1
    else:
        pass
if i > 0:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
S = [int(i) for i in list(str(input()))]
bad_ = 0
for i in range(len(S)):
  if i == 0:
    if S[0] == S[1]:
      print("Bad")
      bad_ += 1
      break
  else:
    if S[i] == S[i-1]:
      print("Bad")
      bad_ += 1
      break

if bad_ == 0:
  print("Good")

Submission status: Accepted

Solution code:
S=input()
a = [int(c) for c in S]

if (a[0]-a[1]) * (a[1]-a[2]) * (a[2] - a[3]) ==0:
    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]:
        exit(print('Bad'))
print('Good')

Submission status: Accepted

Solution code:
def main():
  s=input()
  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()

def func(s1, s2):
    return s1 == s2

ans = "Good"

for i in range(3):
    if func(s[i], s[i+1]):
        ans = "Bad"
        break

print(ans)

Submission status: Accepted

Solution code:
def main():
  s=input()
  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:
# ABC131A - Security
def main():
    s = input()
    flg = all(s[i] != s[i + 1] for i in range(len(s) - 1))
    print("Good" if flg else "Bad")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
t = int(input())
u = "Good"

if t % 10 == (t//10) % 10:
  u = "Bad"

if (t//10) % 10 == (t//100) % 10:
  u = "Bad"
  
if (t//100) % 10 == (t//1000) % 10:
  u = "Bad"
print(u)

Submission status: Accepted

Solution code:
S=str(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')

Submission status: Accepted

Solution code:
s=input()
print('Good' if all(c!=d for c,d in zip(s[:-1],s[1:])) else 'Bad')

Submission status: Accepted

Solution code:
S = input()

ok = False
for i in range(1, len(S)):
	if(i<len(S) and S[i]==S[i-1]):
		print("Bad")
		ok = True
		break

if(ok==False):
	print("Good")

Submission status: Accepted

Solution code:
s=list(map(int,input()))
#print(s)
bc=0
gc=0
if s[0]==s[1]:
    bc+=1
else:
    gc+=1
if s[1]==s[2]:
    bc+=1
else:
    gc+=1
if s[2]==s[3]:
    bc+=1
else:
    gc+=1

if 0<bc:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
a=list(input())
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 3:
    print('Good')
  i += 1

Submission status: Accepted

Solution code:
s = [ int(i) for i in input()]
res = ['bad' for i, j in zip(s[:-1], s[1:]) if i-j==0]

if len(res)>0:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

Solution code:
a=input()
b=str(a)
e=0
d=""
for n in range(10):
    d=str(n)+str(n)
    if a.count(d)>0:

        e=e+1

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
x = input()
flag = 0

for i in range(0,3):
    if x[i] == x[i+1]:
        flag += 1
    else :
        flag += 0

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

Submission status: Accepted

Solution code:
output = []
 
for (i, x) in enumerate(input()):
    if i == 0:
        pre = x
    else:
        if pre == x:
            output = "Bad"
        pre = x
            
if len(output) > 0:
    print(output)
else:
    output = "Good"
    print(output)

Submission status: Accepted

Solution code:
a,b,c,d = [int(s) for s in input()]
print('Bad') if a == b or b == c or c == d else print('Good')

Submission status: Accepted

Solution code:
# 同じ数字が連続していないこと
passward = input()


def detector(passward):
    passward_list = list(passward)
    for i in range(len(passward)-1):
        if passward_list[i] == passward_list[i+1]:
            print('Bad', end='')
            break
        else :
            if i == len(passward)-2:
                print('Good', end='')
            continue
        

detector(passward)

Submission status: Accepted

Solution code:
S = input()
sspl = list(S)
flag =0

for i in range(len(sspl) - 1):
  if sspl[i] == sspl[i + 1]:
    flag = 1
    break

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

Submission status: Accepted

Solution code:
print("Bad" if sum((lambda s:[not(int(s[i:i+2])%11) for i in range(3)])(input())) else "Good")

Submission status: Accepted

Solution code:
S = input()
flag = False

for num in range(3):
    if S[num] == S[num + 1]:
        flag = True

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

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:
from sys import stdin

data = stdin.readline().rstrip()
if (data[0] == data[1]) or (data[1] == data[2]) or (data[2] == data[3]):
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
class Security:
    def __init__(self):
        self.S = [str(s) for s in input()]

    def check_difficulty(self):
        pre_cha = ""

        for s in self.S:
            if pre_cha == s:
                print("Bad")
                return

            pre_cha = s

        print("Good")


security = Security()
security.check_difficulty()

Submission status: Accepted

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

num_1 = s_code[0]
num_2 = s_code[1]
num_3 = s_code[2]
num_4 = s_code[3]

if num_1 == num_2:
  print('Bad')
elif num_2 == num_3:
  print('Bad')
elif num_3 == num_4:
  print('Bad')
else:
  print('Good')

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:
n = input()
S = [int(x) for x in list(str(n))]
s=0
for a in range(len(S)-1):
    if S[a]==S[a+1]:
        s+=1


if not s == 0:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = input()

def isGood():
    for i in range(10):
        NN = str(i) * 2
        if S.find(NN) >= 0:
            return 'Bad'
        
    return 'Good'

print(isGood())

Submission status: Accepted

Solution code:
def checker(s):
    for i,v in enumerate(s[:-1]):
        if s[i] == s[i+1]:
            return("Bad")
    return("Good")
s = input()

print(checker(s))

Submission status: Accepted

Solution code:
S = input()

is_bad = False
prev = ""
for s in S:
    if prev == s:
        is_bad = True
        break
    prev = s

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

Submission status: Accepted

Solution code:
S = input()

R = "Good"
bf = S[0]
SL1 = list(S)
SL2 = list(S)[1:]

for s1, s2 in zip(SL1, SL2):
    if s1 == s2:
        R = "Bad"
        break

print(R)

Submission status: Accepted

Solution code:
import sys
S=input()
s=list(S)
for c in range(len(s)-1):
  if s[c]== s[c+1]:
    print("Bad")
    sys.exit()
print("Good")

Submission status: Accepted

Solution code:
S = input()

cnt = 1

for i in S:
    if cnt == len(S):
        print("Good")
        break
    elif i != S[cnt]:
        cnt += 1
    elif i == S[cnt]:
        print("Bad")
        break

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

pre = -1
status = 1
for s in S:
    s = int(s)
    if s == pre:
        status = 0
    pre = s

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

Submission status: Accepted

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

for i in range(0, 3):
    temp = ps[i+1]
    if temp == ps[i]:
        S = True

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

Submission status: Accepted

Solution code:
passward = input()
last = None
for i in passward:
    if last == i:
        print("Bad")
        break
    else:
        last = i
else:
    print("Good")

Submission status: Accepted

Solution code:

s = input()
t = ""
e = 0
for i in range(len(s)):
	if (t == s[i]):
		print("Bad")
		e = 1
		break
	t = s[i]

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