Problem:


Score : 100 points

Problem Statement

The door of Snuke's laboratory is locked with a security code.

The security code is a 4-digit number. We say the security code is hard to enter when it contains two consecutive digits that are the same.

You are given the current security code S. If S is hard to enter, print Bad; otherwise, print Good.

Constraints

S is a 4-character string consisting of digits.

Input

Input is given from Standard Input in the following format:

S

Output

If S is hard to enter, print Bad; otherwise, print Good.

Sample Input 1

3776

Sample Output 1

Bad

The second and third digits are the same, so 3776 is hard to enter.

Sample Input 2

8080

Sample Output 2

Good

There are no two consecutive digits that are the same, so 8080 is not hard to enter.

Sample Input 3

1333

Sample Output 3

Bad

Sample Input 4

0024

Sample Output 4

Bad



Sample input:
3776


Sample output:
Bad

Submission status: Accepted

Solution code:
s = input()
for i in range(len(s) - 1):
    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()
for i in range(len(S)-1):
  if S[i] == S[i+1]:
    print("Bad")
    quit()
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:
a=input()
if(a[0]==a[1]):
    print("Bad")
elif(a[1]==a[2]):
    print("Bad")
elif(a[2]==a[3]):
    print("Bad")
else:
    print("Good")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

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

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

Submission status: Accepted

Solution code:
passward = input()
ok = True
for i in range(1, len(passward)):
  if passward[i] == passward[i - 1]:
    ok = False
    break

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

Submission status: Accepted

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


main()

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

print("Good" if (N[0] != N[1]) and (N[1] != N[2]) and (N[2] != N[3]) else "Bad")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    sys.setrecursionlimit(10**7)
    input = sys.stdin.readline

    s = input().strip()

    if s[0] == s[1]:
        print('Bad')
        exit()

    if s[1] == s[2]:
        print('Bad')
        exit()

    if s[2] == s[3]:
        print('Bad')
        exit()

    print('Good')


main()

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

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
for i,j in zip(s[0:],s[1:]):
  if i==j:
    print("Bad")
    exit()
print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

flg = True
for a, b in zip(s, s[1:]):
    if a == b:
        flg = False
print("Good" if flg else"Bad")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d = input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = list(input())
for i in range(1,4):
  if S[i] == S[i-1]:
    print("Bad")
    exit()
print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

S = input()

for i in range(1,len(S)):
     if S[i] == S[i-1]:
        print("Bad")
        sys.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:
a = input()
print("Bad" if a[0] == a[1] or a[1] == a[2] or a[2] == a[3] else "Good")

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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:
a,b,c,d = str(input())
if a==b or b==c or c==d:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#S = input()
#i = 0
#while i < 3:
#    if S[i] == S[i+1]:
#        print("Bad")
#        break
#    i += i
#    if i == 3:
#        print("Good")


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
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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()
for i in range(1,4):
    if s[i] == s[i-1]:
        print('Bad')
        exit(0)
print('Good')

Submission status: Accepted

Solution code:
from sys import stdin, stdout
from time import perf_counter

import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7




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

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())
import sys
for i in range(1,4):
  if s[i]==s[i-1]:
    print("Bad")
    sys.exit()
    
print("Good")

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
S = input()

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

if ans >= 1:
    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()
print("Good")

Submission status: Accepted

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

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

l = []
for i in zip(a, a[1:]):
    l.append(i)

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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s=str(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()
for i in range(3):
  if s[i] == s[i+1]:
    print("Bad")
    exit()
print("Good")

Submission status: Accepted

Solution code:
a = input()

flag = True

for i in range(len(a)-1):
    if a[i] == a[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()

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 = str(input().split())
i = 0 + 2
while True:
    if s[i] == s[i + 1]:
        print_ans = 'Bad'
        break
    else:
        print_ans = 'Good'
    i += 1
    if i == 3 + 2:
        break
    
print(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()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
s0 = S[0]
for s in S[1:]:
    if s == s0:
        print("Bad")
        exit()
    s0 = 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"
        break

print(ans)

Submission status: Accepted

Solution code:
s = str(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
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc131_a

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

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

Submission status: Accepted

Solution code:
a,b,c,d = input()

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

Submission status: Accepted

Solution code:
S = list(str(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())
for i in range(1, 4):
    # 数値が連続しているかどうか？
    if s[i-1] == s[i]:
        print('Bad')
        exit()
print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
print("Bad" if any(s[i]==s[i+1] for i in range(3)) else "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()
ans = 0
i = 0
while i < 3:
    if S[i] == S[i+1]:
        print("Bad")
        ans += 1
        break
    i += 1
        
if ans == 0:
    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()
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(0,len(s)-1):
    if s[i]==s[i+1]:
        print('Bad')
        break
else:
    print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
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, b, c, d = list(input())
print('Bad' if a==b or b==c or c==d else 'Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()
flag = (s[0]==s[1])or(s[1]==s[2])or(s[2]==s[3])

print("Bad" if flag else "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:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]



s = input()

last = ""
for i in s:
    if (last == i):
        print("Bad")
        exit()
    last = i
print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
a=list(input())
count=0

       
for i in range(4):
  if i==3:
    break
  if a[i]==a[i+1] :
    count+=1
if count>=1:
  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()
print('Good')

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict


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


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

    print("Good")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
s = [int(n) for n in list(input())]

for i in range(3):
    if s[i] == s[i+1]:
        print('Bad')
        sys.exit(0)
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:
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: 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'
        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:
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().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()
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()
p = 'a'
for s in S:
  if p == s:
    p = 'a'
    break
  else:
    p = s
print("Bad" if p == 'a' else "Good")

Submission status: Accepted

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

Submission status: Accepted

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

def main():

    S = [int(x) for x in str(input())]

    ans = 'Good'

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
bl = True
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:
v = list(map(int, input()))
for i in range(len(v) - 1):
    if v[i] == v[i+1]:
        print("Bad")
        quit()
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_a.py
# https://atcoder.jp/contests/abc131/tasks/abc131_a

# A - Security /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点: 100点

# 問題文
# すぬけ君の管理する研究室の扉にはロックがかかっており、解錠にはセキュリティコードを入力する必要があります。
# セキュリティコードは 4桁の数字列です。セキュリティコードが「入力しづらい」とは、同じ数字が連続する箇所が存在することを言います。
# 現在のセキュリティコード Sが与えられます。Sが「入力しづらい」なら Bad を、そうでなければ Good を出力してください。

# 制約
#     Sは半角数字のみからなる長さ 4の文字列

# 入力
# 入力は以下の形式で標準入力から与えられます。
# S


# 出力
# セキュリティコード Sが「入力しづらい」なら Bad を、そうでなければ Good を出力してください。

# 入力例 1
# 3776

# 出力例 1
# Bad

# 2文字目と 3 文字目が同じなので、3776は入力しづらいセキュリティコードです。

# 入力例 2
# 8080

# 出力例 2
# Good

# 同じ数字が連続していないので、8080は入力しづらいセキュリティコードではありません。

# 入力例 3
# 1333

# 出力例 3
# Bad

# 入力例 4
# 0024

# 出力例 4
# Bad


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    S = lines[0]
    # N = int(lines[0])
    # X, A = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(6):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(M):
    #     valueses.append(list(map(int, lines[i+1].split())))

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

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3776']
        lines_export = ['Bad']
    if pattern == 2:
        lines_input = ['8080']
        lines_export = ['Good']
    if pattern == 3:
        lines_input = ['1333']
        lines_export = ['Bad']
    if pattern == 4:
        lines_input = ['0024']
        lines_export = ['Bad']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b,c,d=input()
print('Bad' if a==b or b==c or c==d else 'Good' )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d=input()
print("Good" if a!=b!=c!=d else "Bad")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = list(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(1,len(S)):
  if S[i]==S[i-1]:
    print('Bad')
    exit()
print('Good')

Submission status: Accepted

Solution code:
a, b, c, d = input()
print("Bad" if a==b or b==c or c==d else "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 = 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()

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

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

else:
    print('Good')

Submission status: Accepted

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

Submission status: Accepted

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

s = input()
before = '-'
for i in s:
    if i == before:
        print('Bad')
        exit(0)

    before = i

print('Good')

Submission status: Accepted

Solution code:
S = input()
flag = False
tmp = ''
for s in S:
  if tmp == s:
    flag = True
  tmp = s
if flag == True:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

Solution code:
n = input()
for i in range(3):
    if n[i] == n[i+1]:
        print("Bad")
        exit()
print("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:
import sys
S = input()
for i in range(1,len(S)):
  if S[i] == S[i-1]:
    print("Bad")
    sys.exit()
print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input()
flag = 0

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

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

Submission status: Accepted

Solution code:
S = 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(len(s)-1):
  if s[i] == s[i+1]:
    print("Bad")
    exit()
print("Good")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(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=list(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()
cnt = 1
maxcnt=1
for i in range(1,4):
  if s[i]==s[i-1]:
    cnt += 1
  else:
    maxcnt = max(cnt,maxcnt)
    cnt=1
maxcnt = max(cnt,maxcnt)
if maxcnt>=2:
  print("Bad")
else:
  print("Good")

Submission status: Accepted

Solution code:
import sys
arr = list(input())

before = arr[0]
for I in range(1,len(arr)):
    if before == arr[I]: print('Bad');sys.exit()
    before = arr[I]
print('Good')

Submission status: Accepted

Solution code:
s = list(input())
t = s[0]
for i in range(1, 4):
    if t == s[i]:
        print('Bad')
        exit()
    t = s[i]

print('Good')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
pc = ""
for c in list(input()):
  if pc == c:
    print('Bad')
    exit()
  else:
    pc = c
print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

S = rs()

prev = ''
for c in S:
	if prev == c:
		print('Bad')
		exit()
	prev = c
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()
n = len(S)
flag = False
for i in range(1, n):
  if S[i] == S[i-1]:
    flag = True
if flag == True:
  print('Bad')
else:
  print('Good')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c, d = input()

if a==b or b==c or c==d:
  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:
S = input()
f = 0
for i in range(len(S)-1):
  if S[i] == S[i+1]:
    f = 1
if f == 0:
  print('Good')
else:
  print('Bad')

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
s = input()

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