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

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()
var = True
for i in range(1, len(s)):
  if s[i]==s[i-1]:
    var = False
    break
    
if var:
  print("Good")
else:
  print("Bad")

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    S = input()

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

    print("Good")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
l = s[0]
for i in range(1, len(s)):
    if l == s[i]:
        print('Bad')
        quit()
    l = s[i]
print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
s = int(s)
syoulist = []

syou1 = s//1000
amari1 = s%1000
syoulist.append(syou1)
syou2 = amari1//100
amari2 = amari1%100
syoulist.append(syou2)
syou3 = amari2//10
amari3 = amari2%10
syoulist.append(syou3)
syoulist.append(amari3)
flag = 0
for i in range(len(syoulist)-1):
    if syoulist[i]==syoulist[i+1]:
        flag+=1
    else:
        flag+=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
s = str(input())

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

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

Submission status: Accepted

Solution code:
x = input().rstrip()
count = 0
temp = ""
how = True
for i in x:
  if temp == i:
    how=False
  temp = i

if how:
  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:
#!/usr/bin/python
# -*- Coding: utf-8 -*-
import re


a=input()


if len(a) == len(re.sub("([0-9])\\1(?!\\1)", "", a)) and len(a) == 4:

    print("Good")

else:

    print("Bad")

Submission status: Accepted

Solution code:
a = input()

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

if re.search(r'(.)\1',s):
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
number=[]
number=list(map(int,input()))

bad=0
good=0
for i in range(len(number)-1):
    tmp=number[i]
    if tmp is  number[i+1]:
        bad+=1
    else:
        good+=1

if bad >= 1:
    print("Bad")
elif good is 3:
    print("Good")

Submission status: Accepted

Solution code:
ss = input()

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

Submission status: Accepted

Solution code:
x = input()

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

Submission status: Accepted

Solution code:
str = input()
p = ""
result = "Good"
for s in str:
    if p == s :
        result = "Bad"
    p = s
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:
a = input()
x = int(a)
b = "Good"
for i in range(len(a)-1):
    if a[i] == a[i+1]:
        b = 'Bad'
        break
    else:
        continue
print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
N = len(S)
nunber = []
ans = "Good"

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

print(ans)

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
a=input()
i=0

while(i<3):
  if(a[i]==a[i+1]):
    t="Bad"
    break
  else:
    t="Good"
  i+=1
print(t)

Submission status: Accepted

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

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 = False
if S[0] == S[1]:
    flag = True
if S[1] == S[2]:
    flag = True
if S[2] == S[3]:
    flag = True
if flag:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
S = int(input())

a = S%10
S = S//10
b = S%10
S = S//10
c = S%10
S = S//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()
ans = "Good"

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

print(ans)

Submission status: Accepted

Solution code:
x = input()

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

Submission status: Accepted

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

i=int(input())


lst = []
while i > 0:
    lst.append(i%10)
    i //= 10 
lst.reverse()
#print(lst)
if (len(lst) == 4):
    if (lst[0] == lst[1] or lst[1] == lst[2] or lst[2] == lst[3] ):
        print('Bad')
    else:
        print('Good')
elif (len(lst) == 3):
    if (lst[0] == lst[1] or lst[1] == lst[2]):
        print('Bad')
    else:
        print('Good')
elif (len(lst) == 2 or 1 or 0):
    print('Bad')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:

num = input()

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

Submission status: Accepted

Solution code:
p = input()

for i in range(3):
  if p[i] == p[i + 1]:
    print("Bad")
    quit()
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 = input()

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

if aa==b:
    print("Bad")
elif b==c:
    print("Bad")
elif c==d:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
check = [f == l for f, l in zip(S[:-1],S[1:])]
string = 'Bad' if any(check) else 'Good'
print(string)

Submission status: Accepted

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

def ri():
    return int(input())

def rl():
    return list(input().split())

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

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:
str = list(input())
s = []
for i in str:
    s.append(int(i))

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

Submission status: Accepted

Solution code:
nums = input()
check = False
w = ["00","11","22","33","44","55","66","77","88","99"]

for i in w:
  check |= i in nums
  
if check:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s = str(input())

k = None
for i in s:
  if i==k:
    print("Bad")
    sys.exit()
  k = i

print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
code = input()

l_ch = code[0]

for i in range(1,4):
  if l_ch == code[i]:
    print("Bad")
    break
  else:
    l_ch = code[i]
else:
  print("Good")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
from math import floor


# calculation process
def check_pass(ps):
    for i in range(len(ps) - 1):
        dif = ps[i] - ps[i + 1]
        if dif == 0:
            print("Bad")
            return ""
    print("Good")
    return ""


# input process
inputData = input()
ps = [int(x) for x in inputData]

check_pass(ps)

Submission status: Accepted

Solution code:
S = input()
for i in range(1, len(S)):
    if S[i] == S[i - 1]:
        print('Bad')
        exit(0)
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:
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:
s = input()
print('Good' if all(s1 != s2 for s1, s2 in zip(s, s[1:])) else 'Bad')

Submission status: Accepted

Solution code:
import sys

x = str(input()) 

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

print('Good')

Submission status: Accepted

Solution code:
# 190622_sat_A

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:
number = input()
before = number[0]
flg = 0
for i in range(1,len(number)):
  if number[i]==before:
    print('Bad')
    flg = 1
    break
  else:
    before = number[i]
if flg == 0:
  print('Good')

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
# import bisect
# import math
# import numpy as np
from fractions import gcd

"""Template"""


class IP:
    """
    入力を取得するクラス
    """
    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    # output.append(a[j])
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x//y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    s = input()
    f = False
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print("Bad")
    else:
        print("Good")


main()

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

print(hoge)

Submission status: Accepted

Solution code:
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()
s = S()
t = ""
for e in s:
    if t == e:
        print("Bad")
        exit()
    t = e
print("Good")

Submission status: Accepted

Solution code:
from sys import stdin

def judge(S):
	S_list  = list(str(S))  #list化
	
	i_pure = None
	for i in S_list:
		if i == i_pure:
			return 'Bad'
		i_pure = i

	return 'Good'


# S = ['3776','8080','1333','0024']

S = stdin.readline()
# for s in S:
# 	print(judge(s))

print(judge(S))

Submission status: Accepted

Solution code:
A = input()

x = ''
y = 0
for i in A:
    if x == i:
        y = 1
        x = i
    else:
        x = i
if y == 1:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = input().split()
 
s = list(S[0])

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()
S = "#"+S+"#"
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:

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

bad_flag = 0

for num in range(0,3):
  if input_data[num] == input_data[num+1]:
    bad_flag = 1

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    S = list(str(input()))
    #print(S)
    for i in range(len(S)):
        if i == 0:
            t = int(S[0])
            continue
        else:
            t = int(S[i-1])
            #print(t)
            if t == int(S[i]):
                print('Bad')
                return
    print('Good')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(1,4):
  if(tmp == s[i]):
    print('Bad')
    exit()
  else:
    tmp = s[i]

print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections as c
ip = lambda : map(int, input().split())
# ##############
mod = 1e9+7
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()
s = [int(x) for x in list(str(n))]
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:
x=input()
ans="Good"
for i in range(0,3):
        if x[i]==x[i+1]:
                ans="Bad"
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans = "Good"
for v in range(10):
    if 0 < s.count(str(v) * 2):
        ans = "Bad"
        break

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

a, b, c, d = input()  # 3文字の文字列
if a==b:
    print("Bad")
    sys.exit()
elif b==c:
    print("Bad")
    sys.exit()
elif c==d:
    print("Bad")
    sys.exit()
print("Good")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
a = input().split()
b = list(map(int,a[0]))
k = True
for i in range(3):
    if b[i] == b[i+1]:
        k = False
if k == True:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

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

prev = None
is_good = True
for ss in s:
  if prev == ss:
    is_good = False
  prev = ss

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

Submission status: Accepted

Solution code:
S = input()
i = -1
j = 0
flg = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
moji=input()
ans="Good"
for i in range(3):
    if int(moji[i])==int(moji[i+1]):
        ans="Bad"
        break
    if int(moji[i])!=int(moji[i+1]):
        continue
print(ans)

Submission status: Accepted

Solution code:
s=list(input())

ans = 'Good'
i = 0

while i+1 < len(s):
  if s[i] == s[i+1]:
    ans = 'Bad'
    break
  else:
    i += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
    N = input()
    pre = ""
    for s in N:
        if s == pre:
            print("Bad")
            return
        pre = s
    print("Good")
main()

Submission status: Accepted

Solution code:
n=int(input())
a=int(n/1000)
an=n-a*1000
b=int(an/100)
bn=an-b*100
c=int(bn/10)
d=bn-c*10

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Number =int (input())

a=int( Number%10)
num_1=int(Number/10)
b= int(num_1%10)
num_2=int(num_1/10)
c= int(num_2%10)
num_3=int(num_2/10)
d= int(num_3%10)

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

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest
def resolve():
    S = input()
    a = 0
    for i in range(len(S) - 1):
        if (S[i] == S[i + 1]):
            a = 1
    if (a == 0):
        print("Good")
    else:
        print("Bad")
resolve()

Submission status: Accepted

Solution code:
s = input()
l = list(s)
flag = 0
for i in range(0,len(l)-1):
	if l[i+1]==l[i]:
		flag=1
		break
if flag==1:
	print('Bad')
else:
	print('Good')

Submission status: Accepted

Solution code:
def acinput():
    return list(map(int,input().split(" ")))

S=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S=input()
prev = ""
flag = False
for i in S:
    if i==prev:
        flag = True
    prev = i
if flag == True :
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:
import sys
N = input()

if len(N) <= 1:
    print('Good')
    sys.exit()

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

print('Good')

Submission status: Accepted

Solution code:
s = list(input())
# print(s)
cnt=0
flag=0
for i in s:
    if cnt==0:
        cnt+=1
        pre=i
        continue
    else:
        if pre==i:
            flag=1
            # print("hoge")
    pre = i
    cnt+=1 
    # print(cnt)
if flag==0:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

Solution code:
s=input()
S=list(s)
a=0

for i in range(0,3):
    if S[i]==S[i+1]:
        print('Bad')
        break
    else:
        a=a+1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = str(input())
a = list(a)

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

Submission status: Accepted

Solution code:
S = [int(x) for x in input()]
k = -1
res = 'Good'
for s in S:
  if k == s:
    res = 'Bad'
    break
  k = s
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
a = s[0]
ans = 0
for i in s[1:]:
  if a == i:
    ans = 1
  a = i
  
print("Bad" if ans else "Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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=int(input())
a=int(S/1000)
b=int((S-a*1000)/100)
c=int((S-a*1000-b*100)/10)
d=int(S-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 = int(input())
n = []
f = 0

while s > 0:
    n.append(s % 10)
    s = s // 10

n.reverse()
if(len(n) < 3):
    f = 1

for i in range(1,len(n)):
    if(n[i] == n[i -1]):
        f = 1
        break

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()
A=list(S)
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:
def main():
    string = input()
    for i in range(len(string) - 1):
        if string[i] == string[i + 1]:
            return "Bad"
    return "Good"

print(main())

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

Solution code:
s = input()
for k in ["11", "22", "33", "44", "55", "66", "77", "88", "99", "00"]:
  if k in s:
    print('Bad')
    break
else:
  print("Good")

Submission status: Accepted

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

print(result)

Submission status: Accepted

Solution code:
from sys import stdin

n = stdin.readline().rstrip()
ex_str = n[0]
for i,a_str in enumerate(str(n)):

    
    if(i>0 and ex_str==a_str):
        print("Bad")
        break
    elif(ex_str!=a_str and i == len(n)-1):
        print("Good")
    ex_str = a_str

Submission status: Accepted

Solution code:
S = input()

flag = True
ps = -1
for i in range(len(S)):
    s = int(S[i])
    if i > 0:
        if s == ps:
           flag = False 
           break
    ps = s
        
if flag is False:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力取得
s = input()

nums = ['00',11,22,33,44,55,66,77,88,99]

flag = 0

for i in nums:
    if str(i) in s:
        flag = 1
        break


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