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:
#    !/usr/bin/env python3
#    encoding: UTF-8
#    Modified: <22/Jun/2019 05:31:41 PM>


#    ✪ H4WK3yE乡
#    Mohd. Farhan Tahir
#    Indian Institute Of Information Technology (IIIT), Gwalior


import sys
import os
from io import IOBase, BytesIO


def main():
    s = input()
    n = len(s)
    ans = 'Good'
    for i in range(1, n):
        if s[i] == s[i - 1]:
            ans = 'Bad'
            break
    print(ans)


BUFSIZE = 8192


class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill():
            pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill()
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

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


class IOWrapper(IOBase):
    def __init__(self, file):
        py2 = round(0.5)
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2 == 1:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            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")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)


def get_array(): return list(map(int, sys.stdin.readline().split()))


def get_ints(): return map(int, sys.stdin.readline().split())


def input(): return sys.stdin.readline().strip()


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = input()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


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

    return


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

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

import itertools
from collections import Counter
from collections import defaultdict
import bisect
from heapq import heappush, heappop

def main():
    s = list(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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
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")
		break
else:
	print("Good")

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("Bad")
    elif q == 0:print("Good")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def printrow(a):
    for i in a:
        print(i)
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

#n = ip()                                     #入力整数1つ
#n,x,b= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(m)]    #入力セット(整数改行あり)(2/2)
#a=[input() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#a.pop(0)は10^5あるときTLEしやすい!注意!抜くなら逆ソート!
if a[0] == a[1] or a[1] == a[2] or a[2] == a[3]:
    j(1)
j(0)

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
for x, y in zip(s, s[1:]):
    if x == y:
        flag = True


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


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


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

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

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 = ''
answer = 'Good'
for s in S:
    if prev == s:
        answer = 'Bad'
        break
    prev = s
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit
# A, B, C = [int(n) for n in input().split()]
# N = int(input())
# a = [int(input()) for _ in range(N)]
S = str(input())
# L = len(S)
# T = str(input())
# exit()
tmp = 0
for s in S:
    if tmp == s:
        print("Bad")
        exit()
    tmp = s
print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def YesNo(x): return 'Yes' if x else 'No'
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

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

print(main())

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from fractions import gcd
from functools import lru_cache, reduce

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


S = sys.stdin.readline().rstrip()
c = list(S)
if c[0] == c[1] or c[1] == c[2] or c[2] == c[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()
for i in range(3):
  if s[i] == s[i+1]:
    print("Bad")
    exit(0)
print("Good")

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

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

Submission status: Accepted

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

print('Good')

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

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

#B
def B():
    n = I()

    return

#C
def C():
    n = I()

    return

#D
def D():
    n = I()

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    A()

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

Solution code:

def main():
    buf = input()
    S = buf
    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()

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

print('Good')

Submission status: Accepted

Solution code:
n=input()
if any(t * 2 in n for t in '0123456789'):
    print ("Bad")
else:
    print ("Good")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
ri = lambda: int(input())
#rl = lambda: [int(x) if x.isdecimal() else x for x in input().split()]
#rl = lambda: list(input().split()))
rl = lambda: map(int,input().split())
rr = lambda N: [list(l) for l in zip(*[rl() for _ in range(N)])]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18
MOD = 10**9+7

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

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:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

S = input()
bs = -1
for s in S:
    if s == bs:
        print('Bad')
        break
    bs = s
else:
    print('Good')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

A, B, C, D = map(int, input().split(' '))

num_C_baisu = B//C - (A-1)//C #(math.ceil(A/C) - 1)

num_D_baisu = B//D - (A-1)//D #(math.ceil(A/D) - 1)

CD = int(C*D/math.gcd(C,D))

num_CD_baisu = B//CD - (A-1)//CD #(math.ceil(A/CD) - 1)

baisu_num = num_C_baisu + num_D_baisu - num_CD_baisu

print(B-A+1-baisu_num)

Submission status: Runtime Error

Solution code:
import math

A, B, C, D = map(int, input().split(' '))

num_C_baisu = (B//C - math.ceil(A/C)) + 1

num_D_baisu = (B//D - math.ceil(A/D)) + 1

CD = int(C*D/math.gcd(C,D))

num_CD_baisu = (B//CD - math.ceil(A/CD)) + 1

baisu_num = num_C_baisu + num_D_baisu - num_CD_baisu

print(B-A+1-baisu_num)

Submission status: Runtime Error

Solution code:
s=input()
print("Good" if len(s)=len(set(s)) else "Bad")

Submission status: Runtime Error

Solution code:
S = int(input())
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print('Bad')

else:
    print('Good')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = range(1, 8 + 1)
    b = range(1, 8 + 1)
    c = range(1, 8 + 1)
    d = range(1, 8 + 1)

    if a == b or b == c or c == d:
        return ('Bad')
    else:
        return ('Good')

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
q=[a,b+1]
for w in range(0,2):
    x=int(q[w]/c)
    y=int(q[w]/d)
    k,j=c,d
    g=c%d
    while g!=0:
        k,j=d,g
        g=k%j
    l=c*d/j
    z=int(q[w]/l)
    q[w]=q[w]-x-y+z
print(q[1]-q[0])

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
q=[a,b+1]
for w in range(0,2):
    x=int(q[w]/c)
    y=int(q[w]/d)
    k,j=c,d
    g=c%d
    while g!=0:
        k,j=d,g
        g=k%j
    l=c*d/j
    z=int(q[w]/l)
    q[w]=q[w]-x-y+z
    print(x,y,z)
print(q[1]-q[0])

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
e = 0
for l in range(a,b+1):
    if l%c != 0 and l%d != 0:
        e += 1
print(e)

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
e = 0
for l in range(a,b):
    if l%c != 0 and l%d != 0:
        e += 1

Submission status: Runtime Error

Solution code:
n, l = map(int, input().split())

s = n*(l-1) + n*(n+1)/2
c = s
j = 1

for i in range(n):
  t = s - ((l-1)-1)
  T = abs(s-t)
  if T < c:
    c = T
    j = i
    
e = l+j
print(int(s-e))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=int(input())

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

Submission status: Runtime Error

Solution code:
arr = list(map(int, input().split()))
for k in range(len(arr)):
  if arr[k] == arr[k+1]:
    print("Bad")
    exit()
print("Good")

Submission status: Runtime Error

Solution code:
S = int(input())
S = str(S)
i_list = list(S)
i_list = [int(i) for i in i_list]

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

Submission status: Runtime Error

Solution code:
S = int(input())
S = str(S)
i_list = list(S)
i_list = [int(i) for i in i_list]

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

Submission status: Runtime Error

Solution code:
S = input()

answer = "Good"
prev_s = s[0]
for s in S[1:]:
  if prev_s == s:
    answer = "Bad"
    break
  prev_s = s

print(answer)

Submission status: Runtime Error

Solution code:
import math

A, B, C, D = map(int, input().split())
CD = int(C * D // math.gcd(C, D))

B_in_C = int(B/C)
B_in_D = int(B/D)
B_in_CD = int(B/(CD))
B_con = B - (B_in_C + B_in_D - B_in_CD)

A = A-1 if A > 1 else A
A_in_C = int(A/C)
A_in_D = int(A/D)
A_in_CD = int(A/(CD))
A_con = A - (A_in_C + A_in_D - A_in_CD)

print(B_con - A_con)

Submission status: Runtime Error

Solution code:
a, b, c, d = map(int, input().split())
ans = 0
for i in range(a,b+1):
    if not i % c == 0 and not i % d == 0:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = int(input())
ans = "Good"
for i in range(10):
  k = str(i)+str(i)
  if(k in s):
    ans = "Bad"
    break
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = intput()
for i in range(1,n):
  if s[i] == s[i-1]:
    print('Bad')
    exit()
print('Good')

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

Solution code:
S=input()
n=len(S)
ans="Good"
for i in (1,n):
  if S[i]==S[i-1]:
    ans="Bad"
    break
print(ans)

Submission status: Runtime Error

Solution code:
S=input()
n=len(S)
ans="Good"
comp=S[0]
for i in (1,n):
  if S[i]==comp:
    ans="Bad"
    break
  comp=S[i]
print(ans)

Submission status: Runtime Error

Solution code:
a=list(input())
count=0
for i in range(4):
  if a[i]==a[i+1] and i==2:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
str = input()

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

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

Submission status: Runtime Error

Solution code:
def common_multiple(x, y):
    for i in range(2, min(x, y)+1):
        if x % i == 0 and y % i == 0:
            return common_multiple(x // i, y // i) * i
    return x * y

a = input().split(" ")
A, B, C, D = int(a[0]) - 1, int(a[1]), int(a[2]), int(a[3])

M = common_multiple(C, D)
B0 = B // C + B // D - B // M
A0 = A // C + A // D - A // M
print(B - A - B0 + A0)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = int(input())

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

if i == 3:
  print("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = int(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: Runtime Error

Solution code:
s = input()
l = len(s)
ans = 0

for i in range(l):
    for k in range(i,k) :
        if s[i] == s[k]:
            ans += 1

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=list(int(input()))
f=True
for i in range(1,4):
	if s[i-1]==s[i]:
		f=False
		break
	else:
		continue
if f:
	print("Good")
else:
	print("Bad")

Submission status: Runtime Error

Solution code:
S = input()
flag = False
for s in S:
  if flag:
    if temp = s:
      print("Bad")
      quit()
  temp = s
  flag = True
print("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from itertools import groupby
import sys
rr = lambda: sys.stdin.readline().rstrip()
s = rr()
print('Good' if len(groupby(s)) == 4 else 'Bad')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
n=str(n)
c=0
for i in range(3):
    if n[i]==n[i+1]:
        c+=1

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
for i in range[1111-9999]
if (s[i] = s[i] + 1):
  print('Bad')
  exit()
else:
  print('Good')

Submission status: Runtime Error

Solution code:
a, b, c,d = map(int, input().split())
import math
min = c*d/math.gcd(c,d)
def num(x):
    return x-x//c - x//d + x//min
print(int(num(b)-num(a-1)))

Submission status: Runtime Error

Solution code:
a=int(input())
b=str(a)
for i in range(len(b)):
  if b[0]==b[1] or b[1]==b[2] or b[2]==b[3]:
    print("Bad")
    break
  else:
    print("Good")
    break

Submission status: Runtime Error

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: Runtime Error

Solution code:
inp = input()
inp = list(inp)
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Submission status: Runtime Error

Solution code:

inp = list(input())
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Submission status: Runtime Error

Solution code:
inp = map(int, input().split())
inp = list(inp)
hard = 0
for number in range(0, 2) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Submission status: Runtime Error

Solution code:
inp = map(int, input().split())
inp = list(inp)
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

Submission status: Runtime Error

Solution code:
inp = map(int, input().split())
inp = inp.list()
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    print ("Bad")
    hard = 1
    
if hard == 0 :
  print ("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
code = list(input())
status = False
for x in range(len(code)):
  if code[x] == code[x+1]:
    print("Bad")
    status = True
if status == False:
  print("Good")

Submission status: Runtime Error

Solution code:
def split(word): 
    return [char for char in word]  
inp=input()
list=split(inp)
count=0
x=1
str="Good"
for i in range(len(3):
    if list[count]==list[count+1]:
        str="Bad"
    count=count+1
print(str)

Submission status: Runtime Error

Solution code:
import math
a,b,c,d = map(int,input().split())

#cで割り切れる数+dで割り切れる数-gcd(c,d)で割り切れる数を求めればよい
ans=(b//c+b//d-b//(c*d//math.gcd(c,d)))-((a-1)//c+(a-1)//d-(a-1)//(c*d//math.gcd(c,d)))

print(b-a+1-ans)

Submission status: Runtime Error

Solution code:
import fractions
A,B,C,D = map(int,input().split())
count = 0
E = C*D/fractions.gcd(C,D)
#print(math.gcd(C,D))
def a(A,B,C):
  key = A//C +1
  if B < C:
    return 0
  else:
    return ((B-key*C)//C )+ 1
   

	
count = a(A,B,C)  + a(A,B,D)-a(A,B,E)
if A==B:
	print(0)
else:
	print(B-A-int(count)+1)

Submission status: Runtime Error

Solution code:
class Work:
    require = 0
    limit = 0
    def __init__(self, require, limit) -> None:
        self.require = require
        self.limit = limit

def from_list(xs) -> Work: 
    return Work(xs[0], xs[1])

N = int(input())

works = [from_list([int(_) for _ in input().split()]) for i in range(N)]

def solve(works):
    works.sort(key=lambda x: x.limit)
    acc = 0
    for w in works:
        acc += w.require
        if acc > w.limit:
            return "No"
    return "Yes"

print(solve(works))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
import sys
a,b,c,d = map(int,input().split())

if (c == 1) or (d == 1):
    print(0)
    sys.exit()

c_all  = b//c
d_all  = b//d
cd_all = int(b//(c*d/math.gcd(c,d)))
count_all = b + cd_all - c_all - d_all

c_a  = (a-1)//c
d_a  = (a-1)//d
cd_a = int((a-1)//(c*d/math.gcd(c,d)))
count_a = a - 1 + cd_a - c_a - d_a

print(count_all - count_a)

Submission status: Runtime Error

Solution code:
s = int(input())

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

Submission status: Runtime Error

Solution code:
s = list(map(int, input().split()))
if s[0] != s[1] and s[1] != s[2] and s[2] != s[3]:
    print('Good')
else:
    print('Bad')

Submission status: Runtime Error

Solution code:
s = list(map(int, input().split()))
if s[0] != s[1] != s[2] != s[3]:
    print('Good')
else:
    print('Bad')

Submission status: Runtime Error

Solution code:
s = int(input())

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

Submission status: Runtime Error

Solution code:
S = int(input())

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

Submission status: Runtime Error

Solution code:
S = int(input())

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