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

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

Submission status: Accepted

Solution code:
from collections import Counter
code = input()
cnt = 0
for i in range(len(code) - 1):
  if code[i] == code[i + 1]:
    cnt += 1
    break
if cnt:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
S = input()
def check(S):
    for i in range(1,len(S)):
        if S[i]==S[i-1]:
            print("Bad")
            return
    print("Good")
    return
check(S)

Submission status: Accepted

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

def solve():
    S = input()
    pre_moji = S[0]
    for i in range(1, len(S)):
        if S[i] == pre_moji:
            print("Bad")
            return
        pre_moji = S[i]
    print("Good")


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
from sys import exit

S = input()

_s = ''
for s in S:
    if _s == s:
        print('Bad')
        exit()
    _s = s

print('Good')

Submission status: Accepted

Solution code:
s = input()
tmp = ""
for i in range(len(s)):
  if tmp == s[i]:
    print('Bad')
    exit()
  tmp = s[i]
print("Good")

Submission status: Accepted

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

f = 1

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

Submission status: Accepted

Solution code:
s = input()

count = 10
flg = True

for x in s:
    if x == count:
        print('Bad')
        flg = False
        break
    count = x

if flg:
    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:
N = input()
pre = 10
count = 0
for x in N:
    if x == pre:
        print("Bad")
        count = 1
        break
    pre = x
if count == 0:
    print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = str(input())
prev = -1
ans = ["Good", "Bad"]
key = 0
for i in n:
  if int(i) == prev:
    key = 1
  else:
    prev = int(i)
print(ans[key])

Submission status: Accepted

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

def main():
    S = input()
    cnt = 0
    for i in range(len(S)-1):
        if S[i]==S[i+1]:
            cnt += 1
    to_print = "Good" if cnt==0 else "Bad"
    print(to_print)

if __name__=='__main__':
    main()

Submission status: Accepted

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

t = 0
for i in range(len(S)-1):
  if S[i] == S[i+1]:
    t = 1
    break  
  else:
    pass

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

Submission status: Accepted

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

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

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:
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:
def check(s):
    for i in range(1,len(s)):
    	if s[i-1] == s[i]:
    	    return 'Bad'
    	else:
    	    pass
    return 'Good'

if __name__ == "__main__":
    s = input()
    print(check(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(map(int,input().split()))
a=0
b=0
c=0
d=0
list=[]
a=s[0]%10
list.append(a)
b=s[0]%100-a
b=int(b/10)
list.append(b)
c=s[0]%1000-b-a
c=int(c/100)
list.append(c)
d=s[0]-a-b-c
d=int(d/1000)
list.append(d)
p=0
q=0
for p in range(3):
  if list[p]==list[p+1]:
    q=q+1
if 0<q:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    s_input = input()
    assert len(s_input) == 4

    flag = 0
    if s_input[0] == s_input[1]:
        flag = 1
    elif s_input[1] == s_input[2]:
        flag = 1
    elif s_input[2] == s_input[3]:
        flag = 1

    if flag == 0:
        print('Good')
    elif flag == 1:
        print('Bad')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = list(input())
for c in range(3):
    a = k[c]
    if a == k[c + 1]:
        print("Bad")
        break
    elif c == 2:
        print("Good")

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
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 pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


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:
if __name__ == '__main__':
    s0 = str(input())
    s1 = s0[1:]
    # print(s0, s1)
    bad = False
    for x,y in zip(s0,s1):
        if x == y:
            bad = True
            break
    if bad:
        print('Bad')
    else:
        print('Good')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s = input()

flag = False

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
A = [int(S[0]),int(S[1]),int(S[2]),int(S[3])]

flg = 0
for i in range(len(A) - 1):
  if A[i] == A[i + 1]:
    flg = 1
    break

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

Submission status: Accepted

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

S = input()

b = ""
f = False
for c in S:
    if b == c:
        f = True
        break
    b = c

result = "Bad" if f else "Good"

print(result)

Submission status: Accepted

Solution code:
keys = list(input())

target = ''
for key in keys:
  if target == key:
    print('Bad')
    exit()
  else:
    target = key
    
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:
s=list(input())
result = "Good"
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        result = "Bad"
        break
print(result)

Submission status: Accepted

Solution code:
def main():
    data = input().strip()
    flag = False
    for i in range(1, len(data)):
        if data[i-1] == data[i]:
            flag = True
    if flag:
        print('Bad')
    else:
        print('Good')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
s = np.array(list(input()))
print('Bad' if (s[1:]==s[:3]).any() else 'Good')

Submission status: Accepted

Solution code:
lis = list(input())

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

Submission status: Accepted

Solution code:
S=list(map(int,list(input())))
n=S[0]
for i in range(1,len(S)):
  if n==S[i]:
    print('Bad')
    exit()
  else:
    n=S[i]
print('Good')

Submission status: Accepted

Solution code:

# -*- coding: utf-8 -*-
# @Date    : 2019-06-24 21:08:43
# @Author  : raj lath (oorja.halt@gmail.com)
# @Link    : link
# @Version : 1.0.0

import sys
sys.setrecursionlimit(10**5+1)

inf     =  int(10 ** 20)
max_val =  inf
min_val = -inf

RW  = lambda : sys.stdin.readline().strip()
RI  = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]


ins = list(RW())
last = ins.pop()
ans  = "Good"
while ins:
    if last == ins[-1]:
        ans = "Bad"
        break
    else:
        last = ins.pop()
print(ans)

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

x = "Good" if n[0] != n[1] and n[1] != n[2] and n[2] != n[3] else "Bad" 
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
S = [int(i) for i in 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:
# -*- coding: utf-8 -*-

import sys
import copy

sys.setrecursionlimit(1000000)

# input = sys.stdin.readline

# ~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

S = input().rstrip()

good = True

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

print(["Bad", "Good"][good])

Submission status: Accepted

Solution code:
s = input()
flag = False
for i in range(len(s) - 1):
    if s[i] == s[i + 1]:
        flag = True
print("Bad" if flag else "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()

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

Submission status: Accepted

Solution code:
S=str(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()
for i in range(3):
    if s[i] == s[i+1]:
        print('Bad')
        exit()
print('Good')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()
p = ""
result = "Good"
for s in str:
    if p == s:
        result = "Bad"
        break
    p = s

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(str(input()))
ans = 'Good'

for i in range(len(S)-1):
    if S[i] == S[i+1]:
        ans = 'Bad'
    else:
        pass

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

d1 = S[0]
d2 = S[1]
d3 = S[2]
d4 = S[3]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
nums = input()

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

Submission status: Accepted

Solution code:
a = list(map(int, 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:
lock_num = input()
#lock_num = [int(x) for x in lock_num]
tag = 0
for i in range(3):
  if int(lock_num[i]) == int(lock_num[i+1]):
    tag = 1
    break
if tag == 0:
  print("Good")
else:
  print("Bad")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=int(input())

b=int(s%1000)
a=int((s-b)/1000)
d=int(b%100)
c=int((b-d)/100)
f=int(d%10)
e=int((d-f)/10)

if a==c or c==e or e==f :
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
import sys
s=list(input())
s.append("ed")
i=0

while True:
    if s[i+1]=="ed":
        print("Good")
        break
    if s[i+1]==s[i]:
        print("Bad")
        sys.exit()
    i+=1

Submission status: Accepted

Solution code:
password = input()
password_list = list(password)
ans = "Good"

for i in range(1, len(password_list)):
    if password_list[i-1] == password_list[i]:
        ans = "Bad"

print(ans)

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input();

prevNum = '';
flag = False;
for chr in S:
  # ここのループでchrが1文字になっていない
  if chr == prevNum:
    flag = True;
    break;
  else:
    prevNum = chr;

if flag:
  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'
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = str(input())
lst = []
STATUS = "Good"
lst = list(map(int, n))
for i in range(3):
  if lst[i] == lst[i + 1]:
    STATUS = "Bad"
  else:
    pass
print(STATUS)

Submission status: Accepted

Solution code:
s = list(input())

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

print('Good')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=str(input())
i1=''
j=0
for i in S:
    if i==i1:
        print('Bad')
        break
    elif j==3:
        print('Good')
    i1=i
    j=j+1

Submission status: Accepted

Solution code:
sl = list(input())
prev = 'a'
for si in sl:
    if prev == si:
        print('Bad')
        exit()
    prev = si
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:
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:
input = input()
is_good = True
for i, s in enumerate(input):
    if i > 0 and s == input[i-1]:
        is_good = False
        break
    if i < len(input) -1 and s == input[i+1]:
        is_good = False
        break
if is_good:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

Solution code:
import sys

def def1(s):
    
    if s[0] == s[1]:
        return True
    
    if len(s) == 2:
        return False
    
    return def1(s[1:])

def main():
    input = sys.stdin.readline
    S = input()
    
    print('Bad' if def1(S) else 'Good')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
import re
import bisect
from datetime import datetime as dt
import bisect
import math

def gcd(a, b):
    return math.gcd(a, b)

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

class slist(list):
    def __init__(self, *args, **kw):
        list.__init__(self, *args, **kw)
        self.sort()

    def append(self, value):
        bisect.insort(self,value)

    def index_left(self, value):
        return bisect.bisect_left(self, value)


if __name__ == '__main__':
    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=0
for i in range(0,3):
  if S[i]==S[i+1]:
    a=a+1
    
if a==0:
  print("Good")
else:
  print("Bad")

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=str(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=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()
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()
print("Bad") if s[0] == s[1] or s[1] == s[2] or s[2] == s[3] 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:
#!/usr/bin/env python3

if __name__ == '__main__':
    s = input()
    f = True
    for c in range(1, len(s)):
        if s[c-1] == s[c]:
            f = False

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

Submission status: Accepted

Solution code:
S = input()

print(["Bad", "Good"][all(S[i] != S[i+1] for i in range(3))])

Submission status: Accepted

Solution code:
n = str(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()
judge = "Good"
for num in range(3):
  if int(S[num]) == int(S[num + 1]):
    judge = "Bad"
    break
print(judge)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if int(cnt):
    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[2] == S[3]:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
s = int(input())

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

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

Submission status: Accepted

Solution code:
s = input()
s = str(s)
boo = 1
for i in range(0,len(s)-1):
	if(s[i:i+1]==s[i+1:i+2]):
		boo=0
if(boo==1):
	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[2] == S[3]:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

Solution code:
S = input()

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

print(judge(S))

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
if 0 in [int(x) - int(y) for x, y in zip(S[:-1], S[1:])]:
    print('Bad')
else:
    print('Good')

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

flag = 'Good'
bef = ''
for s in code:
  if ( bef == s ):
    flag = 'Bad'
  bef = s

print(flag)

Submission status: Accepted

Solution code:
N = list(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 = str(input())
is_good = True
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        #print('Bad')
        is_good = False
        break

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

Submission status: Accepted

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

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

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans = True
a = ""
for i in s:
	if i == a:
		ans = False
		break
	a = i

if ans:
	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[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:
n = input()
prev = ""
for char in n:
  if char == prev:
    print("Bad")
    break
  prev = char
else:
  print("Good")

Submission status: Accepted

Solution code:
in_s = input()

s = list(in_s)

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

Submission status: Accepted

Solution code:
list = input()
chk = 10
for code in list :
    if chk == code :
        print("Bad")
        break
    chk = code
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()

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:

pas = input()
pas = list(pas)

for i in range(3):
    if pas[i] == pas[i+1]:
        print('Bad')
        exit()
    a = i
print('Good')

Submission status: Accepted

Solution code:
in_ = input()
is_ok = "Good"
for i in range(0,len(in_)-1):
  if in_[i] == in_[i+1]:
    is_ok = "Bad"
print(is_ok)

Submission status: Accepted

Solution code:
S = input()
prev = ''
res = True # True: Good
for i in range(len(S)):
  if S[i] == prev:
    res = False
    break
  else:
    prev = S[i]
print('Good' if res else 'Bad')

Submission status: Accepted

Solution code:
print(["Good", "Bad"][[True] in [[i==j] for i,j in zip(*[[list(s[1:]) if i==0 else list(s[:-1]) for i in range(2)] for s in [input()]][0])]])

Submission status: Accepted

Solution code:
import sys

data=input()

a = None
for b in data:
  if a == b:
    print("Bad")
    sys.exit()
  a = b

print("Good")

Submission status: Accepted

Solution code:
S = input()
check = S[0]
ans = 0
for i in [1, 2, 3]:
    if check == S[i]:
        ans = 1
        break
    else:
        check = S[i]

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

Submission status: Accepted

Solution code:
S=raw_input()

prev=""
for x in S:
	if prev==x:
		print "Bad"
		quit()
	prev=x
else:
	print "Good"

Submission status: Accepted

Solution code:
n=input()
ans="Good"
for x in range(1,4):
  if n[x]==n[x-1]:
    ans="Bad"
    break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c,d=input()
a1=int(a)
b1=int(b)
c1=int(c)
d1=int(d)
if a1==b1 or b1==c1 or c1==d1:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

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

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

Submission status: Accepted

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

print(out)

Submission status: Accepted

Solution code:
S=input()
s=str(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:
a=input()
out='Good'
for i in range(3):
  if a[i]==a[i+1]:
    out='Bad'
    
print(out)

Submission status: Accepted

Solution code:
s = input()

ans = "Good"

s_temp = 99

for num in s:
    if int(num) == s_temp:
        ans = "Bad"
        break
    else:
        s_temp = int(num)

print(ans)

Submission status: Accepted

Solution code:
number = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s=str(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:
def check_code(s):
    for n in range(10):
        nn = str(n) + str(n)
        if s.find(nn) >= 0:
            return("Bad")
    return "Good"

print(check_code(input().rstrip()))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def YesNo(x): return 'Yes' if x else 'No'
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 II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    S = SI()
    ans = 'Good' if S[0] != S[1] != S[2] != S[3] else 'Bad'
    return ans

print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

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

Submission status: Accepted

Solution code:
import re
print('Bad' if re.search(r'(.)\1', input()) else 'Good')