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:
# n = int(sys.stdin.readline())
# a, b = map(int, sys.stdin.readline().split())
# c = list(map(int, sys.stdin.readline().split()))
# s = [list(map(int,list(sys.stdin.readline()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# a = 100
# b = 0.987654321
# print('{0:06d}-{1:6f}'.format(a,b))  # 0埋め, 小数点出力桁指定時のときの出力
# 000100-0.987654

import math
import sys
import itertools
import queue

mod = 1000000007

if __name__ == "__main__":
    c = list(input())
    prev = c[0]
    for e in c[1::]:
        if e == prev:
            print("Bad")
            exit()
        prev = e
    print("Good")

Submission status: Accepted

Solution code:
a=input()
k=0
for i in range(3):
  if a[i]==a[i+1]:
    k+=1
  else:
    k+=0
if k>=1:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
S=input()

for i in range(1, len(S)):
#    print(S[i])
    if S[i] == S[i-1]:
        print('Bad')
        exit()
        
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:
def resolve():
    S = input()
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            print("Bad")
            return
    print("Good")
    


if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
S = 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()
n=len(s)
def solve():
    for i in range(n-1):
        if s[i]==s[i+1]:
            return "Bad"
    return "Good"
print(solve())

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for atcorder program
###

import sys
import math
import array

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    ### Mat Multiplication
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        #print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]
#R = float(input())
#A = [int(x) for x in input().split()]
#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

def main():
    S = input()
    temp = "114514"
    ans = "Good"
    for i in S:
        if temp == i:
            ans = "Bad" 
            break
        temp = i

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

S=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()
hoge = 0

for i in range(3):
        if S[i]==S[i+1]:
                hoge = 1

if hoge == 0:
        print('Good')
if hoge == 1:
        print('Bad')

Submission status: Accepted

Solution code:
S = input()
pre = None
for i in S:
    if i == pre:
        ans = 'Bad'
        break
    else:
        ans = 'Good'
        pre = i
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import random
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def main():

	#S = int(input())
	S = list(input())
	#W, H, x, y = map(int, input().split(" "))
	#L = list(map(int, input().split(" ")))

	S = S[:-1]

	for i,val in enumerate(S):
		if i == 0:
			continue
		if val == S[i-1]:
			print("Bad")
			sys.exit()
		

	print("Good")

if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
s = input()

prev = 'k'

for each in s:
    if prev == each:
        print("Bad")
        exit()
    prev = each

print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

tmp='a'
flg=0
for a in s:
    if tmp == a:
        flg =1    
    tmp = a

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

Submission status: Accepted

Solution code:
code = input()

c_prev = ''
judge = True
for c in code:
	if c == c_prev:
		judge = False
	c_prev = c

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

for i in range(10):
    if (str(i)+str(i)) in s:
        print("Bad")
        exit()

print("Good")

Submission status: Accepted

Solution code:
s = input()
if min([len(set(s[i:i+2])) for i in range(len(s)-1)]) == 1:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

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

print("Good")

Submission status: Accepted

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


main()

Submission status: Accepted

Solution code:
s = input()
for i in range(10):
    b = str(i)*2
    if b in s:
        print("Bad")
        exit()
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 = input()

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

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

Submission status: Accepted

Solution code:
N = str(input())

o = N[0]
for i in N[1:]:
    if o == i:
        s = 'Bad'
        break
    else:
        o = i
        s = 'Good'

print(s)

Submission status: Accepted

Solution code:

S = input()

word = "p"
Judge = True

for i in range(len(S)):
    if word == S[i]:
        Judge = False
        break

    word = S[i]

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

Submission status: Accepted

Solution code:
import itertools

def input_ints():
    return list(map(int, input().split()))

def output_list(v):
    print(' '.join(str(x) for x in v))

def main():
    s = input()
    for i in range(3):
        if s[i] == s[i + 1]:
            print('Bad')
            return
    print('Good')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

n=list(input())
s=""
a=0
for i in range(len(n)):
    if s ==n[i]:
        a=5
       
        break
    else:
        s=n[i]
if a==0:
    print("Good")
else:
     print("Bad")

Submission status: Accepted

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

tmp=""
for i in S:
    if tmp==i:
        print("Bad")
        exit()
    tmp=i

print("Good")

Submission status: Accepted

Solution code:
s = input()
j = s[0]
k = ""
ans = "Good"
for i in range(1,4):
    if s[i] == j:
        ans = "Bad"
    j = s[i]
print(ans)

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=input().rstrip()
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:
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(len(s)-1):
    if s[i]==s[i+1]:
        print("Bad")
        break
else:print("Good")

Submission status: Accepted

Solution code:
s = input()

s = list(s)
bad = sum([s[i]==s[i+1] for i in range(3)])
if bad:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = input()

bef = 0

for s in S:
    if s == bef:
        print("Bad")
        exit()
    bef = s
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:
S=str(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())
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()

before = ""
flg = True
for n in range(len(S)):
    if S[n] == before:
        flg = False
    before = S[n]


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

Submission status: Accepted

Solution code:
S = input()

before="a"
bad = 0
for s in S:
    if before == str(s):
        bad=1
    before = str(s)

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

Submission status: Accepted

Solution code:
import numpy as np

a = input()

x = [i for i in a]

count = 0
flag = 0
while count < len(x)-1:
    if x[count]==x[count+1]:
        flag = 1
        print("Bad")
        break
    count += 1
if flag == 0:
    print("Good")

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

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

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():

    s = S()
    cur_c = s[0]
    ans = "Good"
    for c in s[1:]:
        if c == cur_c:
            ans = "Bad"
        cur_c = c
    print(ans)
main()

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

S = stdin.readline().rstrip()

for k in range(len(S) - 1):
    if S[k] == S[k + 1]:
        print('Bad')
        exit()
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:
import sys
a=input()
at=int(a[0])
for i in a[1:]:
    if at==int(i):
        print('Bad')
        sys.exit()
    at=int(i)
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 = str(input())

a = 'a'
for i in S:
    if a == i:
        print('Bad')
        exit()
    a = i

print('Good')

Submission status: Accepted

Solution code:
S = list(input())

flag = True

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

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
li = []
j = ""
flag = 0
for i in s:
        if j == i:
             flag = 1
             break
        j = i
if flag == 1:
        print("Bad")
else:
        print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

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

print('Good')

Submission status: Accepted

Solution code:
S = input()
ans = False
for i in range(1,len(S)):
    if S[i] in S[i-1]:
        ans = True

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

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np

S = stdin.readline().rstrip().split()[0]

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

Submission status: Accepted

Solution code:
num = input()

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

Submission status: Accepted

Solution code:
S= input()

a="s"
correct=0
for i in S:
  if  a == i:
      correct=1
      break
  else:
      a = i

if correct==1:
    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")
    break
else:
  print("Good")

Submission status: Accepted

Solution code:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.special import perm
# from scipy.special import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

########

S = input()

ans = False
for i in range(0, 9):
    if S.count(str(i)*2) >= 1:
        ans = True

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

array = list(map(int, s))

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

last = S[0]
for i in range(1, len(S)):
  c = S[i]
  if c == last:
    print('Bad')
    break
  last = c
else:
  print('Good')

Submission status: Accepted

Solution code:
S=input()

before = ''
isBad=False
for s in S:
    if s == before:
        isBad=True
    before=s

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
c = 0
for k in range(3):
	if S[k] == S[k + 1]:
		c = 1
		break
if c == 1:
	print("Bad")
else:
	print("Good")

Submission status: Accepted

Solution code:
S = input()

old = ""
flag = False

for s in list(S):
  if s == old:
    flag = True
    break
  else:
    old = s
if flag:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

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

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

if fl == True:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
st = input()

b = ''
ans = 'Good'
for s in st:
  if b == s:
    ans = 'Bad'
    break
  b = s

print(ans)

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

check = 0

for i in range(4):
    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()
ans = "Good"
for i in range(3):
    if s[i] == s[i+1]:
        ans = "Bad"
 
print(ans)

Submission status: Accepted

Solution code:
s = input()
difficult = False
for i in range(3):
    if s[i] == s[i+1]:
        difficult = True

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

Submission status: Accepted

Solution code:
S = input()

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

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

Submission status: Accepted

Solution code:
a,b,c,d = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

S_list = list(input())
counter = 0

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

Submission status: Accepted

Solution code:
def main():
    str = list(input())  # 1文字区切りでリスト格納
    last = ""
    for s in str:
        if s == last:
            print("Bad")
            return
        last = s

    print("Good")


main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
from collections import defaultdict

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
S = input()

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

Submission status: Accepted

Solution code:
s = list(input())
flag = False
for i in range(3):
    if s[i] == s[i+1]:
        flag = True
        break

if flag:
    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:
a=list(input())
a=[int(s) for s in a]
cut=0
for i in range(len(a)-1):
    if a[i]==a[i+1]:
        print("Bad")
        cut=1
        break
if cut==0:
    print("Good")

Submission status: Accepted

Solution code:
def abc():
    s = list(input().rstrip())
    for i in range(1, 4):
        if s[i] == s[i-1]:
            print('Bad')
            return
    print('Good')


abc()

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 = input()
black = ['11', '22', '33', '44', '55', '66', '77', '88', '99', '00'] 
print('Bad' if any(S.count(b) for b in black) else 'Good')

Submission status: Accepted

Solution code:
def main():
    n = list((input()))
    for i in range(3):
        if n[i] == n[i+1]:
            return "Bad"
            break
    return "Good"


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
pins = input()

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

Submission status: Accepted

Solution code:
S = list(str(input()))
t = ''
for s in S:
  if t == s:
    print('Bad')
    quit()
  t = s
print('Good')

Submission status: Accepted

Solution code:
s = input().rstrip()

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

Submission status: Accepted

Solution code:
# coding: utf-8
import time
import re
import math

def main():
    s=input()
    b=s[0]
    for a in range(1,len(s)):
        if b==s[a]:
            print("Bad")
            return
        b=s[a]
    print("Good")
def hoge():
    return
start=time.time()
main()
#print("処理速度 {}sec".format(time.time()-start))
#"YNeos"[True::2]
#A=list(map(int,input().split()))
#A,B,C=map(int,input().split())
#n=int(input())
# global n,A,s,memo,mx,mn,L,B

Submission status: Accepted

Solution code:
N = input()
l = [str(i)+str(i) for i in range(10)]
ans = 0
for i in l:
    if i in N:
        ans = "Bad"
        break
if ans==0:
    print("Good")
else:
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
S = input()


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

Submission status: Accepted

Solution code:
inp = list(str(input()))
d = None
for f in inp:
    if d == f:
        print('Bad')
        exit()
    else:
        d = f
print('Good')

Submission status: Accepted

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

    before = S[i]
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:
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:
S = input()
n = len(S)
for i in range(n-1):
    if S[i] == S[i+1]:
        print('Bad')
        exit()
else:
    print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = 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:
def main():
  s = input().strip()
  prevs = s[0]
  is_aa = False
  for _s in s[1:]:
    if prevs == _s:
      is_aa = True
      break
    prevs = _s
  if is_aa:
    print('Bad')
  else:
    print('Good')

if __name__ == '__main__':
  main()

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

judge = 0
for i in range(3):
  if string[i]==string[i+1]:
    judge += 1

if judge!=0:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:

S = input()
def judge(S):
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            return False
    return True

if judge(S):
    print("Good")
else:
    print("Bad")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

res = 0
for i in range(3):
    if S[i]== S[i+1]:
        res = 1

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

Submission status: Accepted

Solution code:
words = lambda t : list(map(t, input().split()))
s = input()
bad = False
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        bad = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
ans = False
for i in range(3):
    if s[i] == s[i + 1]:
        ans = True
print(['Good', 'Bad'][ans])

Submission status: Accepted

Solution code:
s = input()

print("Bad") if any([ v == s[i+1] for i, v in enumerate(s) if i < len(s) - 1]) else print("Good")

Submission status: Accepted

Solution code:
a=list(str(input()))
ans=0
for i in range(len(a)-1):
    if a[i]==a[i+1]:
        ans+=1

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    n = input()
    if n[1] == n[2] or n[2] == n[3] or n[1] == n[0]:
        print("Bad")

    else:
        print("Good")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    S=input()
    bf = S[0]
    for s in S[1::]:
        if bf == s:
            return False
        bf = s
    return True

if __name__ == '__main__':
    if main():
      print("Good")
    else:
      print("Bad")

Submission status: Accepted

Solution code:
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
import heapq
INF = float("inf")
sys.setrecursionlimit(10**7)
# 4近傍（右, 下, 左, 上）
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W
def mi(): return map(int, input().split())
def ii(): return int(input())
###template###

S = input()

first = S[0]
for s in S[1:]:
  if first == s:
    print('Bad')
    exit()
  first = s

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:
S = input()
ahead = S[0]
flag = False
for s in S[1:]:
    if s == ahead:
        flag = True
        break
    ahead = s
if flag:
    print("Bad")
else:
    print("Good")