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:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]
    

"""
N, X = map(int, input().split())

x = list(map(int, input().split()))

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

# 多次元配列の宣言（あとでintにすること。）（タプルにすること。）
dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

#Distance Transformation
    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""


S = input()
    
def main():
    tmp = ""
    for s in S:
        if s == tmp:
            return print("Bad")
        else:
            tmp = s
    print("Good")
                
                
                
            
            
                

    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:


def main():
    s = input()
    l = list(map(int, s))

    import numpy as np
    d = np.diff(l)

    if any(d==0):
        print("Bad")
    else:
        print("Good")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A
S= input()
t = ''
flg = 0
for s in S:
    if s == t:
        flg = 1
        print('Bad')
        break
    t = s
if flg == 0:
    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:
s = list(input())
ans = "Good"
for i in range(3):
  if s[i]==s[i+1]:
    ans = "Bad"
    break
print(ans)

Submission status: Accepted

Solution code:
s = input()

now = 0
ans = 'Good'
for i in range(len(s)):
    if now == s[i]:
        ans = 'Bad'
    now = s[i]

print(ans)

Submission status: Accepted

Solution code:
N = input()

a=int(N[0])
b=int(N[1])
c=int(N[2])
d=int(N[3])
  
if a==b or b==c or c==d:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# from bisect import bisect_right
# gcd
# from fractions import gcd
# from math import ceil, floor
# from copy import deepcopy
# from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# fin = open('in_1.txt', 'r')
# sys.stdin = fin
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template



if __name__ == '__main__':

    # write code
    Lis = li()
    if Lis[0] == Lis[1] or Lis[1] == Lis[2] or Lis[2] == Lis[3]:
        print("Bad")
    else:
        print("Good")

Submission status: Accepted

Solution code:
s =list(input())
tmp = ""
for ss in s:
    if ss == tmp:
        print("Bad")
        exit()
    tmp = ss
print("Good")

Submission status: Accepted

Solution code:
S= input()
c_prev = ""
import sys
for c in S:
    if c == c_prev:
        print("Bad")
        sys.exit()
    c_prev = c
print("Good")

Submission status: Accepted

Solution code:
s = input()
oi = False
for i in range(3):
    if s[i] == s[i+1]:
        oi = True
if not oi:
    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:
#n,q= map(int,input().split())
s = input()
a = 0
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 = list(input())
temp = s[0]
for i in range(1, len(s)):
    if temp == s[i]:
        print('Bad')
        exit()
    temp = s[i]
print('Good')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
s = input()
f = True
b = ''
for i in s:
    if i == b:
        f = False
    b = i
if f:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)

debug = True
#debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)


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

def solve():
    l = input()

    bad = False
    if l[0] == l[1]:
        bad = True

    if l[1] == l[2]:
        bad = True
    if l[2] == l[3]:
        bad = True

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

solve()

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 "00" in s or "11" in s or "22" in s or "33" in s or "44" in s or "55" in s or "66" in s or "77" in s or "88" in s or "99" in 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')
        quit()

print('Good')

Submission status: Accepted

Solution code:
x = "x"
for y in input():
    if x == y:
        print("Bad")
        break
    x = y
else:
    print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
prev = ''
result = 'Good'
for c in a:
  if prev == c:
    result = 'Bad'
    break
  prev = c
  
print("{}".format(result))

Submission status: Accepted

Solution code:
import sys
S = list(input())
v = S.pop(0)
for s in S:
    if s == v:
        print('Bad')
        sys.exit()
    v = s

print('Good')

Submission status: Accepted

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

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

print('Good')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()

if len(s) == 1:
    print("Good")

before = s[0]
for a in s[1:]:
    if a == before:
        print("Bad")
        exit()
    before = a
print("Good")

Submission status: Accepted

Solution code:
s = input()
c = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()

bad = 0
for i in range(1,len(S)):
    if(S[i-1]== S[i]):
        bad +=1
        break
    
if(bad > 0):
    print('Bad')
else:
    print('Good')

Submission status: Accepted

Solution code:
S = input()

S = list(S)

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

Submission status: Accepted

Solution code:
S = input()

tmp = S[0]
flag = True
for i in range(1, 4):
    if tmp == S[i]:
        flag = False
        break
    else:
        tmp = S[i]
if flag:
    print('Good')
else:
    print('Bad')

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


def check(s):
    tmp = s[0]
    for i in s[1:]:
        if tmp == i:
            return "Bad"
        tmp = i
    return "Good"

print(check(s))

Submission status: Accepted

Solution code:
S = input()
res = "_"
ans = 'Good'
for s in S:
	if res == s:
		ans = "Bad"
		break
	res = s
print(ans)

Submission status: Accepted

Solution code:
S = input()
ans = "Good"
for i in range(len(S)):
    if i == 0:
        moji = S[i]
        continue

    if moji == S[i]:
        ans = "Bad"
        break

    moji = S[i]

print(ans)

Submission status: Accepted

Solution code:
t=0
for i in input():
	if t==i:
		print("Bad")
		exit()
	t=i
print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
pw = input()

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

        
print(str(ans))

Submission status: Accepted

Solution code:
import os, sys, re, math

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

Submission status: Accepted

Solution code:
s = list(input())
pre = ''
f = False
for i in s:
    if i == pre:
        f = True
    pre = i

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ans = True

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

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

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=input()
count=0
for i in range(len(s)-1):
  if s[i]==s[i+1]:
    count+=1
print('Good' if count==0 else 'Bad')

Submission status: Accepted

Solution code:
s=input()
tmp = -1
ans = "Good"
for a in s:
    t = int(a)
    if tmp == t:
        ans = "Bad"
    tmp = t
print(ans)

Submission status: Accepted

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


def solve(S: str):
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            print('Bad')
            return
    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 = next(tokens)  # type: int
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()

last = ""
flag = True
for s in S:
    if last == s:
        flag = False
    else:
        pass
    
    last = s

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = 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:
A=input()
#arr=[]
tmp="aaaaa"
flag=0
for i in A:
    if i==tmp:
        flag=1
    tmp=i
if flag==1:
    print("Bad")
else:
    print("Good")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

s = S[0]
for i in range(1, 4):
    if S[i] == s:
        print("Bad")
        break
    elif i == 3:
        print("Good")
    s = S[i]

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
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:
#!/usr/bin/env python3
import sys


def solve(S: int):
    pw = str(S).zfill(4)

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

    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 = int(next(tokens))  # type: int
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

s_lst = list(s)

cnt = 0
for i in range(0, len(s_lst)):
    if i == 0:
        pass
    elif s_lst[i-1] == s_lst[i]:
        cnt += 1

if cnt == 0:
    print("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=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:
#!/usr/local/bin/python3

def solve(s):
	p = ''
	for c in s:
		if c == p:
			return 'Bad'
		p = c
	return 'Good'

s = input()
ans = solve(s)
print(ans)

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ans = 'Good'

for i in range(1,4):
    if S[i]==S[i-1]:
        ans = 'Bad'


print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = 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:
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 = 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()
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]:
    ans = 'Bad'
else:
    ans = 'Good'


print(ans)

Submission status: Accepted

Solution code:
#!venv/bin/python
 
import math
import numpy as np
import random
import copy
import statistics 
import bisect
import heapq
from collections import defaultdict 
import time
import sys
from pprint import pprint
import itertools

S = input()
#A = [ int(x) for x in input().split() ]
#B = [ int(x) for x in input().split() ]

bad = False
prev = "a"
for s in S:
    if prev == s:
        bad = True
        break
    prev = s

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

Submission status: Accepted

Solution code:
N = input()

flag = False
tmp = N[0]
for i in range(1,len(N)):
    if tmp==N[i]:
        print('Bad')
        exit()
    tmp = N[i]
print('Good')

Submission status: Accepted

Solution code:
S = input()

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

print(answer)

Submission status: Accepted

Solution code:
s = input()

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    ret = 'Bad'
else:
    ret = 'Good'

print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
ans = True

for i in range(0,len(s)-1):
    if s[i] == s[i+1]:
        ans = False 

print("Good") if ans 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:
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:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    S = input_raw[0]
    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:
S = input()
Judge = True
for x in range(0,len(S)-1):
    if S[x] == S[x+1]:
        Judge = False
if Judge:
    print('Good')
else:
    print('Bad')

Submission status: Accepted

Solution code:
s = input()

ans = "Good"
for i in range(10):
    ls = [str(i)*j for j in range(2, 5)]
    for t in ls:
        if t in s:
            ans = "Bad"
print(ans)

Submission status: Accepted

Solution code:
#coding:utf-8
S = input()
old = ""
for s in S:
  if old == s:
    print ("Bad")
    exit()
  old = s
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()
first = True
last = "x"
for c in S:
  if last == c:
    print("Bad")
    exit()
  last = c

print("Good")

Submission status: Accepted

Solution code:
S = input()

prev = ''
safe = True
for s_ in S:
    if prev != s_:
        prev = s_
    else:
        safe = False
        break
print("Good" if safe else "Bad")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
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:
#https://atcoder.jp/contests/abc131/tasks/abc131_a

s = list(str(input()))
flag = False
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        print('Bad')
        flag = True
        break

if flag == False:
    print('Good')

Submission status: Accepted

Solution code:
# coding=utf-8


S = raw_input()
for i, j in zip(S, S[1:]):
    if i == j:
        print "Bad"
        exit()
print "Good"

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

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

if (s.find('00') > -1 or
	s.find('11') > -1 or
	s.find('22') > -1 or
	s.find('33') > -1 or
	s.find('44') > -1 or
	s.find('55') > -1 or
	s.find('66') > -1 or
	s.find('77') > -1 or
	s.find('88') > -1 or
	s.find('99') > -1):
	print('Bad')
else:
	print('Good')

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    S = input()

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

input = lambda: stdin.readline().rstrip()
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()
flag = 0

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

Submission status: Accepted

Solution code:
S = input()

ans = "Good"

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

memo = ""
ans = "Good"
for s in S:
  if not memo:
    memo = s
  else:
    if memo == s:
      ans = "Bad"
  memo = s
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()

pre = "*"
easy = False
for c in s:
    if pre == c:
        easy = True
        break
    pre = c

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

# N = int(input())
# L = [int(x) for x in input().split()]
# N, M = map(int, input().split())
S = input()

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

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

Submission status: Accepted

Solution code:
S=list(input())
def answer(S):
    for i in range(3):
        s=S[i:i+2]
        if s[0]==s[1]:
            return 'Bad'
    return 'Good'
print(answer(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
from sys import stdin
import sys

s = stdin.readline().rstrip()
#print(s)
for i in range(len(s)-1):
    if s[i+1] == s[i]:
        print('Bad')
        sys.exit()
print('Good')

Submission status: Accepted

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

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:
#!/usr/bin/env python3
import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = (next(tokens))  # type: int
    result = solve(S)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

s = read()
old = ''
for i in list(s):
    if old == i:
        print("Bad")
        exit()
    old = i
print("Good")

Submission status: Accepted

Solution code:
#!/usr/bin/env python

import sys

s = sys.stdin.readline().strip()

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

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

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    S = stdin.readline().rstrip()
    for i, c in enumerate(S[:-1]):
        if c == S[i + 1]:
            print('Bad')
            return
    print('Good')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
ch = 0

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

if ch == 0:
    print("Good")
else:
    print("Bad")