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:
def read():
    S = input().strip()
    return S,


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


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

Submission status: Accepted

Solution code:
s = input()

state = True
prev = ''
for c in s:
    if c == prev:
        state = False
        break
    prev = c

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
# = map(int,input().split())
ans = ''
for s in S:
    if s == ans:
        print('Bad')
        exit()
    else:
        ans = s
print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC131 A
import sys
import math

S = input()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    s_ = ''
    for s in input():
        if s_ == s:
            return 'Bad'
        else:
            s_ = s
    return 'Good'

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

Submission status: Accepted

Solution code:
S = list(input())
output = "Good"
mae = ""
for i in range(4):
    ima = S[i]
    if mae == ima:
        output = "Bad"
    mae = S[i]

print(output)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

print(main())

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

Submission status: Accepted

Solution code:
s = raw_input()

if any(s[i] == s[i - 1] for i in xrange(1, len(s))):
    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:
s = str(input())

for a,b in zip(s,s[1:]):
    if a == b:
        print('Bad')
        break
else:
    print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
s = input()
prev = ''
ans = 'Good'
for i in s:
    if i == prev:
        ans = 'Bad'
    prev = i
print(ans)

Submission status: Accepted

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

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

pre = S[0]
ok = True
for i in range(1,4):
    if pre == S[i]:
        print("Bad")
        ok = False
        break
    pre = S[i]

if ok:
    print("Good")

Submission status: Accepted

Solution code:
def main():
    S = input()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
tmp = s[0]
for x in range(1,len(s)):
  if s[x] == tmp:
    print("Bad")
    exit()
  
  tmp = s[x]
print("Good")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)

a = input()
temp = "wwww"
counter = 0
for i in a:
    if i == temp:
        counter = 1
        break
    temp = i
if counter == 0:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

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

print(f)

Submission status: Accepted

Solution code:
# coding:utf-8


def main():
    # N = int(input())
    S = list(input())
    flag = True
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            flag = False
    if flag:
        print('Good')
    else:
        print('Bad')
    # N, M = map(int, input().split())
    # print()


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin
s = (stdin.readline().rstrip())
tmp = s[0]
flag = True
for i in s[1:]:
    if i == tmp:
        flag = False
    tmp = i
if flag:
    print("Good")
else:
    print("Bad")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(map(int, list(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:
# -*- 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:
n=input()
ans="Good"
for i in range(3):
    if n[i]==n[i+1]:
        ans="Bad"
print(ans)

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

ans = "Good"

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

Submission status: Accepted

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

Submission status: Accepted

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

S = input()

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

print(ans)

Submission status: Accepted

Solution code:
s = input()

prev_c = ""
ans = False
for c in s:
    if c == prev_c:
        ans = True
        break
    prev_c = c

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

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:
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
def ddprint(x):
  if DBG:
    print(x)

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


def main():
    A = input()
    print('Bad' if A[0] == A[1] or A[1] == A[2] or A[2] == A[3] else 'Good')



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())

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

Submission status: Accepted

Solution code:
s = input()

out = "Good"
before_c = s[0]
for c in s[1:]:
    if c == before_c:
        out = "Bad"
        break
    before_c = c

print(out)

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
import sys
s = str(input())
for i in range(3):
    if s[i] == s[i+1]:
        print('Bad')
        sys.exit()
print('Good')

Submission status: Accepted

Solution code:
s = input()

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

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 solve():
    S = input()
    for i in range(3):
        if S[i] == S[i + 1]:
            print("Bad")
            return True
    print("Good")
    return False


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
s=input()

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

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

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b = map(int, input().split())
# 


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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, d=DVSR): return pow(x, d - 2, d)
def DIV(x, y, d=DVSR): return (x * INV(y, d)) % d
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())


S=input()
last=S[0]
res = 'Good'
for c in S[1:]:
    if c == last:
        res = 'Bad'
    last = c

print(res)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = str(next(tokens))  # type: int
    solve(S)

if __name__ == '__main__':
    main()

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()
prev_digit = S[0]
for digit in S[1:]:
    if digit == prev_digit:
        print("Bad")
        exit(0)
    prev_digit = digit
print("Good")

Submission status: Accepted

Solution code:
s=input()

now=s[0]
for i in range(1,len(s)):
    if now==s[i]:
        print("Bad")
        quit()
    else:
        now=s[i]
print("Good")

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
p = None

bad = False
for c in s:
    if p == c:
        bad = True
        break
    p = c

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

Submission status: Accepted

Solution code:
#ABC131A

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

p_n = 'x'
for n in S:
    if (n == p_n):
        print('Bad')
        exit()
    p_n = n


print('Good')

Submission status: Accepted

Solution code:
def main():
  v = list(map(int, input().strip()))

  for i in range(len(v) - 1):
    if v[i] == v[i + 1]:
      print('Bad')
      return

  print('Good')


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import sys, itertools, collections
sys.setrecursionlimit(10**7)
def lmi(): return list(map(int, input().split()))

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

f = 0
for i, s in enumerate(S[:-1]):
    if s == S[i+1]:
        f = 1
if f == 1:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

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

import os
import sys
from __builtin__ import xrange as range
from cStringIO import StringIO
from future_builtins import ascii, filter, hex, map, oct, zip
from io import IOBase

import __pypy__


def main():
    s = input()
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print('Bad')
    else:
        print('Good')


# region fastio

BUFSIZE = 8192


class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

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


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    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()


sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#
import sys
import math
import numpy as np
import itertools


# 文字列をリストに
s = list(input())

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

print('Good')

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

s = ns()
tf = True
for i,j in zip(s[:-1], s[1:]):
    if i == j:
        tf = False

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
ans = "Good"

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

Submission status: Accepted

Solution code:
s=input()
pre='#'
import sys
for i in s:
    if pre==i:
        print('Bad')
        sys.exit()
    else:
        pre=i
print('Good')

Submission status: Accepted

Solution code:
#最初に入れておくとinputが早くなる
import sys
input = sys.stdin.readline

s = input()
flag = False

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
S = input()

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

Submission status: Accepted

Solution code:
# 2019/06/22
# AtCoder Beginner Contest 131 - A

# Input
b = input()

# Calc
ans = "Good"
for i in range(1, 4):
    if b[i] == b[i-1]:
        ans = "Bad"

# Output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

#a, b = [int(i) for i in 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 = 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:
# ABC131
def main():
    s = input()
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print("Bad")
    else:
        print("Good")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = str(input())
for i in range(1,len(S)):
    if S[i] == S[i-1]:
        print("Bad")
        exit()
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:
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()
was = ''
for c in S:
    if c == was:
        print('Bad')
        quit()
    was = c
print('Good')

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

main()

Submission status: Accepted

Solution code:
S = input()

Flag = False
for i in range(1,len(S)):
    if S[i] == S[i-1]:
        Flag = True

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

Submission status: Accepted

Solution code:
S = input()

prev = None
for i in S:
    if i == prev:
        print("Bad")
        exit(0)

    prev = i

print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
pre=' '
isBad=False
for si in s:
    if si==pre:
        isBad=True
    pre=si
if isBad:
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
S = input()

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

print('Good')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
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 sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

from functools import lru_cache

def main(): 
    s = SI()
    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
before = ""
for c in S:
    if before == c:
        flag = False
    before = c

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

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

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

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
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 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

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
from collections import Counter, deque, defaultdict
from itertools import accumulate, permutations, combinations, takewhile, compress, cycle
from functools import reduce
from math import ceil, floor, log10, log2, factorial
from pprint import pprint

sys.setrecursionlimit(1000000)
# MOD = 10 ** 9 + 7
# N = int(input())
# A = [int(x) for x in input().split()]
# V = [[0] * 100 for _ in range(100)]
# A = [int(input()) for _ in range(N)]

S = input()

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print("Bad")
    sys.exit()

print("Good")
sys.exit()

Submission status: Accepted

Solution code:
import sys
import math 
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input()

S = ns()
prev = S[0]
for s in S[1:]:
    if prev ==s:
        print("Bad")
        exit()
    prev =s
print("Good")

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s =  str(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:
from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
import heapq as hq; import itertools as its; import operator as op


# globals
inf = float('inf')
input = stdin.readline


def main():
    s = get_lc()
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print("Bad")
    else:
        print("Good")
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


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


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    setrecursionlimit(4100000)
    main()

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:
#!/usr/bin/env python3
#!/usr/bin/env pypy3

import sys
sys.dont_write_bytecode = True
stdin = sys.stdin
input = stdin.readline
sys.setrecursionlimit(10000000)

#import numpy as np
#import scipy as sp

# Python 3 modules: https://docs.python.org/3/library/

import math, itertools, operator
from math import *
from math import factorial as fact
from operator import itemgetter, attrgetter
from itertools import permutations, combinations
from functools import reduce, lru_cache
# Use scipy for stats: https://docs.scipy.org/doc/scipy/reference/stats.html
# Before Python 3.5.  Import from math after it.
from fractions import gcd
from fractions import Fraction as Frac

inf = float('inf')

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

def perm(a, b):
    import scipy.special
    return scipy.special.perm(a, b, exact = True)

def comb(a, b):
    import scipy.special
    return scipy.special.comb(a, b, exact = True)

def dfact(n):
    import scipy.special
    return scipy.special.factorial2(n, exact = True)

def prod(l):
    return reduce(operator.mul, l)

def input_ints(func = input, sep = None, conv = int):
    return list(map(conv, func().split(sep = sep)))

################################################################################


def main():
    #S, = list(map(int, input().split()))
    S = input()
    for i in range(3):
        if S[i] == S[i+1]:
            print('Bad')
            return
    print('Good')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
S = input()

t = ""
for a in S:
    if t == a:
        print('Bad')
        break
    t = a
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:
import sys
N = input()

form=""
for s in N:
    if form == s:
        print("Bad")
        sys.exit()
    else:
        pass
    form = s
print("Good")

Submission status: Accepted

Solution code:
s = input()

ans = "Good"

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

Submission status: Accepted

Solution code:
s=input()
a=s[0]
b=s[1]
c=s[2]
d=s[3]

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000)
 
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()

def f():
    p = ""
    for s in S:
        if p == s:
            return True
        p = s

    return False

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

Submission status: Accepted

Solution code:


def read_input():
    s = input()
    cs = [c for c in s]

    return cs


def submit():
    cs = read_input()

    for c1,c2 in zip(cs, cs[1:]):
        if c1 == c2:
            print('Bad')
            return

    print('Good')
    return


if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    S = str(input().strip())

    a = ''
    for s in S:
        if s == a:
            return 'Bad'
        a = s

    return 'Good'


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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline

S = readline().rstrip()

if any(S[i] == S[i + 1] for i in range(len(S) - 1)):
    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'
        break

print(ans)

Submission status: Accepted

Solution code:
S = input()

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

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

Submission status: Accepted

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

#n = int(input())
#a = [int(i) for i in 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:
import sys

def main():
    a = sys.stdin.readline().strip()
    # [int(i) for i in sys.stdin.readline().strip().split()]
    # [[int(i) for i in sys.stdin.readline().strip().split()] for _ in range(2)]
    f = 'Good'
    for i in range(3):
        if a[i] == a[i+1]:
            f = 'Bad'

    print(f)

main()

Submission status: Accepted

Solution code:
s = list(input())

cnt = 0

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