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:
S = input()
flag = True
for i in range(3):
    if S[i + 1] == S[i]:
        flag = False
        break

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

Submission status: Accepted

Solution code:
S=input()

def f(S):
  for s in range(len(S)):
    if s!=0:
      if S[s]==S[s-1]:
        return "Bad"
  return "Good"

print(f(S))

Submission status: Accepted

Solution code:
x=input()
chars = list(x)
n=0
for n in range(3):
    if chars[n]==chars[n+1]:
        print('Bad')
        break
    else :
        n+=1

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys;
import string;
sys.setrecursionlimit(20000) # 再起呼び出しの最大数をセット

import copy
import itertools

from functools import lru_cache
#@lru_cache(maxsize = None)

PPP = 1000000007

# 整数の入力
#n = int(input())

# スペース区切りの整数の入力
#a = [int(x) for x in input().split()]
#n, m = map(int, input().split())
#print("sp", n, k, file=sys.stderr)
#p, q, r = map(int, input().split())
#s = [int(x) for x in input().split()]
#t = [int(x) for x in input().split()]

# 改行区切りの整数の入力
#a = []
#for x in range(n):
#  a.append(int(input()))
#  a.append([int(x) for x in input().split()])
#p = [int(x) for x in input().split()]
#a.sort()
#print(l, file=sys.stderr)

# 文字列の入力
s = input()

# 出力
#print("{} {}".format(a+b+c, s))
#a.sort()
#print(set(a), file=sys.stderr)
#print(len(set(a)))

#cache = dict()

import re

def isGood(s):
  prev = ""
  for x in s:
    if prev == x:
      return False
    prev = x
  return True

def doit():
  if isGood(s):
    return "Good"
  return "Bad"


#print(doit([0] * 4))
#doit(s)
#print(doit())
try:
  print(doit())
except Exception as e:
  print("e", e, file=sys.stderr)

Submission status: Accepted

Solution code:
x=input()
x=int(x)
a=x%10
b=x//10%10
c=x//100%10
d=x//1000%10
e=x//1000%10
d='Good'
if a==b:
  d='Bad'
if b==c:
  d='Bad'
if c==e:
  d='Bad'
print(d)

Submission status: Accepted

Solution code:
s=input()
result = True

for i in range(3):
    if s[i]==s[i+1]:
        result = False
if result:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
password = input()

result = 'Good'

for i in range(len(password)-1):
    if password[i] == password[i+1]:
      result = 'Bad'
      break
      
print(result)

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=list(input())
ans="Good"
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
  ans="Bad"
print(ans)

Submission status: Accepted

Solution code:
S = input()

ch = ""
output = "Good"
for s in S:
  if s == ch:
    output = "Bad"
    break
  ch = s

print(output)

Submission status: Accepted

Solution code:
S = input()
l = list(S)
flg = True
for i in range(0,3):
    if l[i] == l[i+1]:
        flg = False
        break
    else:
        pass
if flg == True:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(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:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    s = S()
    for i in range(3):
        if s[i] == s[i + 1]:
            print("Bad")
            return
    print("Good")
    return

#B
def B():
    n, l = LI()
    lis = [l + i for i in range(n)]
    s = sum(lis)
    a = inf
    for i in lis:
        if abs(a) > abs(i):
            a = i
    print(s-a)
    return

#C
def C():
    def gcd(a, b):
        a, b = max(a, b), min(a, b)
        while b:
            a, b = b, a % b
        return a
    def lcm(a, b):
        return a * b // gcd(a, b)
    a, b, c, d = LI()
    x = b // c - (a-1) // c
    y = b // d - (a-1) // d
    z = b // lcm(c , d) - (a-1) // lcm(c , d)
    print(b-a+1-(x+y-z))
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = list(input())
_before = ''
ans = 'Good'
for i in s:
    if i == _before:
        ans = 'Bad'
        break
    else:
        _before = i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=list(input())
o=0
for j in range(3):
  if int(i[j])==int(i[j+1]):
    print('Bad')
    o+=1
    break
  else:
    None
if o==0:
  print('Good')
else:
  None

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
code = list(input())
isBad = False
for i in range(len(code)-1):
  if (code[i] == code[i+1]):
    isBad = True
if (isBad):
  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()

print("Good")

Submission status: Accepted

Solution code:
nums = input().strip()
pre_num = ""
result = ""
flag = True

for num in nums:
	if pre_num == num: flag = False
	pre_num = num

if flag: result = "Good"
else: result = "Bad"

print(result)

Submission status: Accepted

Solution code:
s = input()
prev = ''
b = True
found = False
for i in s:
    if not found:
        if i == prev:
            print("Bad")
            b = False
            found = True
    prev = i
    
if b:
    print("Good")

Submission status: Accepted

Solution code:
nums = list(input())

ans = "Good"
for n in range(3):
    if nums[n] == nums[n + 1]:
        ans = "Bad"
        break
print(ans)

Submission status: Accepted

Solution code:
import re

s = input()

if re.findall(r"(.)\1+",s):
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

S = input()[:-1]
ans = "Good"
for s1, s2 in zip(S, S[1:]):
    if s1 == s2:
        ans = "Bad"
        break
print(ans)

Submission status: Accepted

Solution code:
str = input()
char_list = list(str)

a = 0

for i in range(len(char_list) - 1):
	if (char_list[i] == char_list[i + 1]) :
		a = 1
if (a == 0) :
	print('Good')
else :
	print('Bad')

Submission status: Accepted

Solution code:
s = list(input())
flag = True

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

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

Submission status: Accepted

Solution code:
S=list(input())

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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]:
  print('Bad')
  exit()
  
if s[1] == s[2]:
  print('Bad')
  exit()

if s[2] == s[3]:
  print('Bad')
  exit()

print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = str(input())

li,li_1 = [],[]
for i in range(len(n)):
    li.append(int(n[i]))

for i in range(len(li)-1):
    li_1.append(li[i+1]-li[i])

if (0 in li_1) == True:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
abcd = int(input())
d = int(abcd % 10)
c = int(((abcd - d) % 100)/10)
b = int((abcd - c*10 - d)%1000/100)
a = int(abcd / 1000)

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()
S = [int(i) for i in S]

delta1 = S[1]-S[0]
delta2 = S[2]-S[1]
delta3 = S[3]-S[2]
  
if delta1 * delta2 * delta3 == 0:
	print('Bad')
else:
	print('Good')

Submission status: Accepted

Solution code:
input_number = int(input())
 
a = input_number//1000
b = (input_number-1000*a)//100
c = (input_number-1000*a-100*b)//10
d = input_number-1000*a-100*b-c*10
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()
if int(S[0])==int(S[1]) or int(S[1])==int(S[2]) or int(S[2])==int(S[3]):
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
a=int(input())
b=a%10
c=(a-b)/10
judg="Good"
for i in range(3):
    if b==c%10:
        judg="Bad"
    else:
        b=c%10
        c=(c-b)/10
print(judg)

Submission status: Accepted

Solution code:
code     = list(input())
bad_flag = False

for i in range(0, 3):
    if code[i] == code[i+1]:
        bad_flag = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

print("Good")

Submission status: Accepted

Solution code:
S = 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:
import sys
S = input()
for x, y in zip(S,S[1:]):
    if x == y:
        print('Bad')
        sys.exit()
print('Good')

Submission status: Accepted

Solution code:
password=str(input())

word=""
flag="Good"
for w in password:
  #print(w)
  if word==w:
    flag="Bad"
  
  word=w
print(flag)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
for v1, v2 in zip(s[1:], s[:-1]):
    if v1 == v2:
        print("Bad")
        break
else:
    print("Good")

Submission status: Accepted

Solution code:
s=input()

isok=True

for k in range(len(s)-1):
    if s[k]==s[k+1]:
        isok=False

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

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:
s = input();
good = 1;
for i in range(3) :
	if s[i] == s[i+1] :
		good = 0;
if bool(good) :
	print('Good');
else :
	print('Bad')

Submission status: Accepted

Solution code:
s=input()
import re
p = '00'
for i in range(1, 11):
  if p in s:
      print('Bad')
      break
  p = str(i * 11)
else:
    print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
code = input()

prev = ''
for i in range(0, len(code)):
    if code[i] == prev:
        print("Bad")
        exit(0)
    else:
        prev = code[i]

print("Good")

Submission status: Accepted

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


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 = list(input())
s_list = []
index = 0
result = "Good"
for x in S:
  if index == 0:
    s_list.append(x)
    index+=1
  else:
    if s_list[index-1] == S[index]:
      result = "Bad"
    else:
      s_list.append(x)
      index+=1
print(result)

Submission status: Accepted

Solution code:
input=list(input())


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

Submission status: Accepted

Solution code:
S = list(input())

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

Submission status: Accepted

Solution code:
n = int(input())
 
a = int(n/1000)
b = int(n/100) -a*10
c = int(n/10)-a*100 - b*10
d = n -a*1000-b*100-c*10
 
if a == b  or b ==c or c == d :
  print("Bad")
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:
S = str(input())
a = int(S[0])
b = int(S[1])
c = int(S[2])
d = int(S[3])

def afunc(a,b,c,d):
  alist = [a,b,c,d]
  pre = a
  for char in alist[1:4]:
    if pre == char:
      print("Bad")
      return
    else:
      pre = char
  print("Good")

afunc(a,b,c,d)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

tmp = ""
is_bad = False
for s in S:
    if s == tmp:
        is_bad = True
    tmp = s

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

def checkSuccessionNum(strNum):
    beforChar = strNum[0]
    
    for c in inputNum[1:]:
        if(beforChar == c):
            return True
        else:
            beforChar = c
            
    return False

inputNum = input()

if(checkSuccessionNum(inputNum)):
    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")
        quit()
print("Good")

Submission status: Accepted

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

tmp = ""
for i in range(len(S)):
    if tmp == S[i]:
        print("Bad")
        sys.exit()
    else:
        tmp = S[i]

print("Good")

Submission status: Accepted

Solution code:
S = raw_input()
flag = 0
A = []
for c in S:
	A.append(int(c))
for i in range(1,4):
	if A[i-1] == A[i]:
		flag = 1
if flag == 0:
	print("Good")
else:
	print("Bad")

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:
inp = input()

preve = ""
for st in inp:
    if st == preve:
        print("Bad")
        exit()
    preve = st
print("Good")

Submission status: Accepted

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

a=S//1000
b=(S-a*1000)//100
c=(S-a*1000-b*100)//10
d=S-a*1000-b*100-c*10
if a!=b and b!=c and c!=d:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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


import sys
import math
from pprint import pprint
import numpy as np


N=input()

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

print('Good')

Submission status: Accepted

Solution code:
	
import sys
Sin = input()
#print(Sin)
S = [int(x) for x in list(str(Sin))]
#print(S)
test = 0
for i in range(0,3):
#    print(i)
    if S[i+1] == S[i]:
        print("Bad")
        test = 1
        sys.exit()
        
if test !=1:
    print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
p = S[0]
ans = 'Good'
for s in S[1:]:
    if s==p:
        ans = 'Bad'
        break
    p = s
print(ans)

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()
lst = []
for i in S:
    lst.append(int(i))
if ((lst[0] == lst[1]) or (lst[1] == lst[2]) or (lst[2] == lst[3])):
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
N = input()
array = list(map(int, N))

count = 0

while count < len(array)-1:
    if array[count] == array[count+1]:
        print("Bad")
        break
    count += 1
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:
S = input()
flag = 0
for i in range(1,len(S)):
    if S[i] == S[i-1]:
        flag = 1
if flag:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
S = int(input())
A=[]
A.append(int(S/1000))
A.append(int((S-A[0]*1000)/100))
A.append(int((S-A[0]*1000-A[1]*100)/10))
A.append(int((S-A[0]*1000-A[1]*100-A[2]*10)))
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:
a=str(input())
b=''
r='Good'
for c in a:
    if b == c:
        r='Bad'
        break
    else:
        b = c
print(r)

Submission status: Accepted

Solution code:
R = input()
S = [s for s in R]
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:
K = list(input())
c = 0
for i in range(len(K)-1):
    if K[i] == K[i+1]:
        c += 1
if c == 0:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ans = 'Good'
for i, j in zip(S,S[1:]):
    if i == j:
        ans = 'Bad'

print(ans)

Submission status: Accepted

Solution code:
s=input()

res="Good"
pre=""
for c in s:
    if c == pre:
        res="Bad"
        break
    pre = c
print(res)

Submission status: Accepted

Solution code:
def main():
    s = list(input())
    t = 0
    for i in range(len(s)-1):
        if int(s[i]) == int(s[i+1]):
            t += 1

    if t >= 1:
        print("Bad")
    else:
        print("Good")
main()

Submission status: Accepted

Solution code:
s = int(input())
s1 = int(s/10)
s2 = int(s1/10)
s3 = int(s2/10)
a1 = s%10
a2 = s1%10
a3 = s2%10
a4 = s3%10
if a1 == a2 or a2 == a3 or a3 == a4:
	print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S=int(input())
if S<100:
    print('Bad')
elif ((S-(S%100))%1100!=0 and (S-(S-(S%1000))-(S%10))%110!=0 and (S%100)%1100!=0):
    print('Good')
else:
    print('Bad')

Submission status: Accepted

Solution code:
line = input()

chars = list(map(int, line))

result = 0

for char_i in range(1, len(chars)):
  pre_char = chars[char_i-1]
  char = chars[char_i]
  
  if char == pre_char:
    result = 1
    
if result == 0:
  print("Good")
else:
  print("Bad")

Submission status: Accepted

Solution code:
s = input()
p  = "*"
ans = "Good"
for c in s:
    if c == p:
        ans = "Bad"
    p = c
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(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= str(input())
flag= True
tmp=''

for i in range(4):
  if(tmp == N[i]):
    flag= False
    break
  tmp= N[i]

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

Submission status: Accepted

Solution code:
S = list(input())

flag = True

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


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

Submission status: Accepted

Solution code:
import sys
inputs = sys.stdin.readlines()

chars = inputs[0]
flag = True
for i in range(1, len(chars)):
  flag = flag and chars[i-1] != chars[i]
  if not flag:
    break

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

Submission status: Accepted

Solution code:
n = str(input())
curr = n[0]
res = 0
for i in range(1, len(n)):
    
    if  n[i] == curr:
        res = 1
    curr = n[i]
        
if res == 1:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
before = -1
for char in input():
    current = int(char)
    if before == current:
        print("Bad")
        exit()
    else:
        before = current

print("Good")

Submission status: Accepted

Solution code:
s = input()
a = [int(b) for b in s]

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

Submission status: Accepted

Solution code:
str = input()
a=str[-4]
b=str[-3]
c=str[-2]
d=str[-1]

if(a is b):
    print("Bad")
elif(b is c):
    print("Bad")
elif(c is d):
    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:
import sys

S = input()

prev = S[0]
i = 1

while i < len(S):
    if prev == S[i]:
        print("Bad")
        sys.exit()
    prev = S[i]
    i += 1

print("Good")

Submission status: Accepted

Solution code:
s= input()

pre="a"
bad=False

for i in s:
  if i == pre:
    bad=True
  pre = i
  
if bad:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
N = list(map(int,input()))
bool = 0
for i in range(len(N) - 1):
    if N[i] != N[i+1]:
        bool = 1
    else:
        print("Bad")
        exit()
if bool == 1:
    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:
S = int(input())
lst = []
while S > 0:
    lst.append(S%10)
    S //= 10 # 必須
while(len(lst) <= 4):
  lst.append(0)
  
if lst[0] == lst[1] or lst[1] == lst[2] or lst[2] == lst[3]:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
def main():

    s = input()
    s = str(s)
    flag = 0

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

flg = 0
for i in range(3):
    if s[i] == s[i+1]:
        flg = 1

if flg == 0:
    print('Good')
else: print('Bad')

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    s = list(input())

    is_bad = False
    for i in range(len(s) - 1):
        if int(s[i]) == int(s[i+1]):
            is_bad = True
            break

    print("Bad" if is_bad == True else "Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input().strip()
slist = [int(c) for c in S]

def main():
    tmp = -1
    for s in slist:
        if s == tmp:
            print("Bad")
            return
        else:
            tmp = s
    print("Good")
    return

main()

Submission status: Accepted

Solution code:
num = input()
num_list = []
for i in num:
    num_list.append(int(i))
index = 0
for i in range(3):
    if num_list[i] == num_list[i + 1]:
        print('Bad')
        exit()
print('Good')

Submission status: Accepted

Solution code:
strInput = input()

isGood = True
strPreChar = ""
for intIdx in range(len(strInput)):
    if intIdx == 0:
        strPreChar = strInput[intIdx]
    else:
        if strPreChar == strInput[intIdx]:
            isGood = False
            break
        else:
            strPreChar = strInput[intIdx]

print("Good") if isGood else print("Bad")

Submission status: Accepted

Solution code:

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

if __name__ == "__main__":
    main()

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 = 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")

Submission status: Accepted

Solution code:
import re
def nchars(s, n):
    """文字列 s に、同じ文字が n 個以上連続している部分文字列を見つける
    """
    assert n > 0
    reg = re.compile("(.)\\1{%d,}" % (n - 1))  # カンマを取ると n 個ちょうどになる
    while True:
        m = reg.search(s)
        if not m:
            break
        yield m.group(0)
        s = s[m.end():]

S = input()
a = list(nchars(S,2))
if len(a)==0:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

def main():
    S = list(input())
    S.append("_")
    for i in range(len(S)-1):
        #print(i)
        if S[i] == S[i+1]:
            return "Bad"
    return "Good"
print(main())

Submission status: Accepted

Solution code:
S = list(input())
S.append("%")
a=0
for i in range(4):
    if ( S[i] == S[i+1]):
        a =1

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

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()
char_list = list(s)
char_len = len(char_list)
tmp = ""


for i, c in enumerate(char_list):
    if tmp == c:
        print("Bad")
        break

    if i == char_len-1:
        print("Good")
    tmp = c

Submission status: Accepted

Solution code:
N =str(input())
pre = "a"
count = 0
for i in range(4):
    if N[i] == pre:
        count += 1
    pre = N[i]
if count > 0:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
x = input()
x = str(x)
f = True

for i in range(1,4):
  if(x[i-1] == x[i]):
    f = False
    break
   
if f:
  print("Good")
else:
  print("Bad")

Submission status: Accepted

Solution code:
s = input()

compare = s[0]
result = 'Good'

for i in s[1:]:
  if i == compare:
    result = 'Bad'
  
  compare = i
  
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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()
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:
inp = str(input())
def a(inp):
    for x in range(3):
    
        if inp[x]==inp[x+1]:
            return 'Bad'
    return 'Good'
print(a(inp))

Submission status: Accepted

Solution code:
a = str(input())

if (a[-1] == a[-2]) or (a[-2] == a[-3]) or (a[-3] == a[-4]):
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
s=[i for i in 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()
temp = ""
for c in S:
  if c == temp:
    print("Bad")
    exit(0)
  temp = c
print("Good")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
import sys
p = input()

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

print("Good")