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

Submission status: Accepted

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

print('Good')

Submission status: Accepted

Solution code:
S = input().rstrip()
tmp = ''
result = 'Good'

for s in S:
    if tmp == s:
        result = 'Bad'
    tmp = s

print(result)

Submission status: Accepted

Solution code:
S=input()
for i in range(10):
    if S.count(str(i)+str(i)):
        print('Bad')
        break
else:
    print('Good')

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

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

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

Submission status: Accepted

Solution code:
s = input().strip()
ans = "Good"
p = s[0]
for i in range(1, len(s)):
    if p == s[i]:
        ans = "Bad"
        break
    p = s[i]
print(ans)

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
s = input()
last = s[0]
flag = 0
for c in s[1:]:
    if c == last:
        flag = 1
    last = c
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(0)
print('Good')

Submission status: Accepted

Solution code:
def debug(*args):
    import sys
    print(*args, file=sys.stderr)

def solve():
    pass

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

print(main())

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    s = input()

    p = s[0]
    for i in s[1:]:
        if i == p:
            print('Bad')
            return
        p = i

    print('Good')


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
s=input()
tp="A"
for i in range(4):
    if s[i]==tp:
        print("Bad")
        exit()
    
    tp=s[i]
print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC131
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()
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/env python
from collections import defaultdict
import math
import re

def main():
    #N, K = map(int, input().split())
    S = input().strip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa == x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))

n = list(input())
a = n[0]

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

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

res = 'Good'

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

print(res)

Submission status: Accepted

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

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    ans = 1

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S):
    for i in range(1, len(S)):
        if S[i-1] == S[i]:
            return "Bad"
    return 'Good'


def main():
    S = read_str()
    print(slv(S))


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

    print('Good')


main()

Submission status: Accepted

Solution code:
import sys
s = input()

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

print("Good")

Submission status: Accepted

Solution code:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
n = input()


ans = "Good"
for c, d in zip(n, n[1:]):
    # print(c,d)
    if c == d:
        ans = "Bad"

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
Ss = input()

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()
beforeChar = ''
for c in S:
    if c == beforeChar:
        print('Bad')
        exit()
    beforeChar = c

print('Good')

Submission status: Accepted

Solution code:
#a = list(map(int, input().split()))
a=input()
if a[0]==a[1] or a[2]==a[1] or a[2]==a[3]:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

Solution code:

def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

import random
import collections
import math
import itertools
import bisect

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


def solve():
    pass


def main():
    if False and 'PYCHARM_HOSTED' in os.environ:
        main_pycharm()
    else:
        real_main()


from copy import deepcopy
def main_pycharm():
    solution = solve

    test_inputs = None
    test_outputs = None
    judge = None
    slow_solution = None
    if solution is not None:
        if test_outputs is not None:
            test_with_answers(solution, test_inputs, test_outputs)
        if judge is not None:
            test_with_judge(solution, test_inputs, judge)
        if slow_solution is not None:
            test_with_slow_solution(solution, test_inputs, slow_solution)


def test_with_answers(solution, inputs, answers):
    total, wrong = 0, 0
    for args, test_ans in zip(inputs, answers):
        ans = solution(*deepcopy(args))
        if ans != test_ans:
            print('WRONG! ans=%s, test_ans=%s, args=%s' % (ans, test_ans, args))
            wrong += 1
        else:
            print('GOOD')
        total += 1
    print('ALL %d TESTS PASSED' % total if not wrong else '%d out of %d tests are WRONG' % (wrong, total))


def test_with_judge(solution, inputs_gen, judge):
    total, wrong = 0, 0
    for args in inputs_gen:
        ans = solution(*deepcopy(args))
        if not judge(deepcopy(ans), *deepcopy(args)):
            print('WRONG! ans=%s, args=%s' % (ans, args))
            wrong += 1
        total += 1
    print('ALL %d TESTS PASSED' % total if not wrong else '%d out of %d tests are WRONG' % (wrong, total))


def test_with_slow_solution(solution, inputs_gen, solution_slow):
    total, wrong = 0, 0
    for args in inputs_gen:
        ans = solution(*deepcopy(args))
        slow = solution_slow(*deepcopy(args))
        if ans != slow:
            print('WRONG! ans=%s, slow=%s, args=%s' % (ans, slow, args))
            wrong += 1
        total += 1
    print('ALL %d TESTS PASSED' % total if not wrong else '%d out of %d tests are WRONG' % (wrong, total))


# This mergesort can be like 7 times faster than build in sort
# (for stupid reasons)
def mergesort(A, key=lambda x: x, reverse=False):
    C = A
    A = list(range(len(A)))
    B = list(A)

    n = len(A)
    for i in range(0, n - 1, 2):
        if key(C[A[i]]) > key(C[A[i ^ 1]]):
            A[i], A[i ^ 1] = A[i ^ 1], A[i]

    width = 2
    while width < n:
        for i in range(0, n, 2 * width):
            R1, R2 = min(i + width, n), min(i + 2 * width, n)
            j, k = R1, i
            while i < R1 and j < R2:
                if key(C[A[i]]) > key(C[A[j]]):
                    B[k] = A[j]
                    j += 1
                else:
                    B[k] = A[i]
                    i += 1
                k += 1
            while i < R1:
                B[k] = A[i]
                k += 1
                i += 1
            while k < R2:
                B[k] = A[k]
                k += 1
        A, B = B, A
        width *= 2

    if reverse:
        A.reverse()
    return A


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

def read():
    return input()

def read_int():
    return int(input())

def read_array(sep=None, maxsplit=-1):
    return input().split(sep, maxsplit)

def read_int_array():
    return [int(a) for a in read_array()]

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=s=input().rstrip()
x=list(s)
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:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

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().strip()
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(str()))
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
input = sys.stdin.readline

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:
from heapq import heappush, heappop, heapify, heapreplace
from collections import defaultdict
from bisect import bisect_left

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

if __name__ == '__main__':
    Solution().main()

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()
k = ""
for i in s:
    if k == i:
        print("Bad")
        break
    k = i
else:
    print("Good")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

pre = ''
ans = False
for c in s:
    if c == pre:
        ans = True
        break
    pre = c

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

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:
def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def main():
    s = input()
    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:
#A問題
S = list(str(input()))
mae = ""
flag = 0
for i in range(4):
    if i == 0:
        mae = S[i]
    else:
        if mae == S[i]:
            flag = 1
            break
        else:
            mae = S[i]
            
if flag == 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:
s = input()
l = ""
res = True
for i in range(4):
    if s[i] == l:
        res = False
    l = s[i]
print("Good" if res else "Bad")

Submission status: Accepted

Solution code:
s = input()

c0 = ''
for c in s:
  if c == c0:
    print('Bad')
    exit()
  c0 = c
print('Good')

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:
# -*- coding: utf-8 -*-
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()

prev = S[0]
for i in range(1,4):
    n = S[i]

    if(n == prev):
        print("Bad")
        exit()
    prev = n
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:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
S = input()
k = "-1"
ans = "Good"
for i in S:
  if k==i:
    ans = "Bad"
  else:
    k=i
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:
import sys

nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

S = s()

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

print('Good')

Submission status: Accepted

Solution code:
import sys
import bisect
input = sys.stdin.readline

S = list(input().strip())

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

Submission status: Accepted

Solution code:
S = input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

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

Submission status: Accepted

Solution code:
S = list(input())

s = S[0]

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

print('Good')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

S=input().strip()

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

Submission status: Accepted

Solution code:
S = input().rstrip()
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(len(s) -1):
  if s[i] == s[i + 1]:
    print('Bad')
    exit(0);
print('Good')

Submission status: Accepted

Solution code:
# coding: utf-8
S = input()
for i in range(3):
    if len(set(S[i:i+2])) == 1:
        print("Bad")
        exit()
print("Good")

Submission status: Accepted

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

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

prev = 'a'

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

print('Good')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

s = input()
last = ''
for i in s:
    if i == last:
        print('Bad')
        sys.exit()
    last = 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:
def inpl(): return list(map(int, input().split()))
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())
if (S[0] == S[1]) | (S[1] == S[2]) | (S[2] == S[3]):
	print('Bad')
else:
	print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

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

Submission status: Accepted

Solution code:
def main():
    S = input()
    for i in range(10):
        if str(i)*2 in S:
            return "Bad"
    return "Good"

print(main())

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

Submission status: Accepted

Solution code:
S = input()

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

print(Ans)

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()
print("Good")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque  # 双方向キュー
from collections import defaultdict  # 初期化済み辞書
from heapq import heapify, heappush, heappop, heappushpop  # プライオリティキュー
from bisect import bisect_left, bisect_right  # 二分探索
#import numpy as np  # 1.8.2
#import scipy  # 0.13.3

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    S = i2s()
    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:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S = ST()
    if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
        print("Bad")
    else:
        print("Good")
if __name__ == '__main__':
    main()

Submission status: Accepted

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