AtCoder Beginner Contest 131 - Security

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-----
3776

-----Sample Output-----
Bad

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

Source: atcoder | Difficulty: EASY


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


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


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


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


t = ''
r = 'Good'
for i in input():
	if t == i:
		r = 'Bad'
	t = i
print(r)


(A, B, C, D) = input()
if A != B != C != D:
	print('Good')
else:
	print('Bad')


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


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


S = input()
if S[0] == S[1]:
	print('Bad')
	return
elif S[1] == S[2]:
	print('Bad')
	return
elif S[2] == S[3]:
	print('Bad')
	return
print('Good')


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


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


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


S = input()
Pass = list(S)
if Pass[0] == Pass[1]:
	print('Bad')
elif Pass[1] == Pass[2]:
	print('Bad')
elif Pass[2] == Pass[3]:
	print('Bad')
else:
	print('Good')


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


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


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


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


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


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


(a, b, c, d) = input()
if a != b and b != c and (c != d):
	print('Good')
else:
	print('Bad')


import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

def I():
	return int(input())

def F():
	return float(input())

def SS():
	return input()

def LI():
	return [int(x) for x in input().split()]

def LI_():
	return [int(x) - 1 for x in input().split()]

def LF():
	return [float(x) for x in input().split()]

def LSS():
	return input().split()

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

def __starting_point():
	resolve()
__starting_point()


s = input()
print('Bad' if True in [s[i] is s[i + 1] for i in range(3)] else 'Good')


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


p = ''
ans = 'Good'
for s in input():
	if s == p:
		ans = 'Bad'
		break
	p = s
print(ans)


(s, t, u, v) = input()
print('Bad' if s == t or t == u or u == v else 'Good')


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


s = input()
prev = s[0]
for i in range(1, 4):
	if s[i] == prev:
		print('Bad')
		return
	prev = s[i]
print('Good')


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


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


import re
s = input()
if re.findall('(.)\\1+', s):
	print('Bad')
else:
	print('Good')


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


s = input()
print('GBoaodd'[s[0] == s[1] or s[1] == s[2] or s[2] == s[3]::2])


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


s = str(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')


(a, b, c, d) = list(input())
if a == b:
	print('Bad')
elif b == c:
	print('Bad')
elif c == d:
	print('Bad')
else:
	print('Good')


n = str(input())
print('Good' if all([n[i] != n[i + 1] for i in range(3)]) else 'Bad')


S = input()
print('GBoaodd'[1 ^ (S[0] != S[1] != S[2] != S[3])::2])


import re
print(re.search('(.)\\1', input()) and 'Bad' or 'Good')


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


s = input()
print('GBoaodd'[any((s[i] == s[i + 1] for i in range(3)))::2])


s = input()
print(['Good', 'Bad'][s[0] == s[1] or s[2] == s[1] or s[2] == s[3]])


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

def __starting_point():
	main()
__starting_point()


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


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


import re
print('GBoaodd'[len(re.sub('(.)\\1', '', input())) != 4::2])


s = list(input())
flag = 0
for i in range(len(s) - 1):
	if s[i] == s[i + 1]:
		flag = 1
print('Bad' if flag == 1 else 'Good')


(a, b, c, d) = input()
print(' GBoaodd'[a != b != c != d::2])


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


import re
s = input()
if re.search('(.)\\1', s):
	print('Bad')
else:
	print('Good')


def atc_131a(input_value: str) -> str:
	for i in range(0, len(input_value) - 1):
		if input_value[i] == input_value[i + 1]:
			return 'Bad'
	return 'Good'
input_value = input()
print(atc_131a(input_value))


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


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


(a, b, c, d) = input()
print(['Bad', 'Good'][a != b != c != d])


S = input()
number = [str(i) * 2 for i in range(0, 10)]
for j in number:
	if j in S:
		print('Bad')
		return
else:
	print('Good')


S = input()
print('Good' if all((S[i + 1] != S[i] for i in range(3))) else 'Bad')


moji = str(input())
flg = 0
for i in range(0, 3):
	if moji[i] == moji[i + 1]:
		flg = 1
print(('Good', 'Bad')[flg == 1])


n = list(input())
if n[0] == n[1]:
	print('Bad')
	return
elif n[1] == n[2]:
	print('Bad')
	return
elif n[2] == n[3]:
	print('Bad')
	return
print('Good')


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


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


S = input()
print('Good' if all((c1 != c2 for (c1, c2) in zip(S, S[1:]))) else 'Bad')


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


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


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


s = input()
for (i, j) in zip(s[0:], s[1:]):
	if i == j:
		print('Bad')
		break
else:
	print('Good')


t = 0
for i in input():
	if t == i:
		print('Bad')
		exit()
	t = i
print('Good')


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


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


s = 'Good'
c = '_'
for c2 in input():
	if c == c2:
		s = 'Bad'
	c = c2
print(s)


s = input()
print('Good' if all((s1 != s2 for (s1, s2) in zip(s, s[1:]))) else 'Bad')


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


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


S = input()
D = []
for i in range(3):
	if S[i] == S[i + 1]:
		D.append(1)
		break
if 1 in D:
	print('Bad')
else:
	print('Good')


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


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


S = input()
print('Good' if all((a != b for (a, b) in zip(S[:3], S[1:]))) else 'Bad')


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


def abc131a(s: str) -> str:
	if s[0] == s[1]:
		return 'Bad'
	elif s[1] == s[2]:
		return 'Bad'
	elif s[2] == s[3]:
		return 'Bad'
	else:
		return 'Good'
s = str(input())
print(abc131a(s))


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


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


pi = ''
j = 'Good'
for i in input():
	if pi == i:
		j = 'Bad'
	pi = i
print(j)


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


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


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


S = input()
res = ''
for s in S:
	if res == s:
		print('Bad')
		return
	res = s
print('Good')


S = list(map(int, input()))
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
	print('Bad')
else:
	print('Good')


s = input()
print('Good' if all((si != sj for (si, sj) in zip(s, s[1:]))) else 'Bad')


s = input()
result = 'Good'
i = 0
j = 1
while j < len(s):
	if s[i] == s[j]:
		result = 'Bad'
		break
	i += 1
	j += 1
print(result)


lis = ['00', '11', '22', '33', '44', '55', '66', '77', '88', '99']
s = input()
ans = True
for i in lis:
	if i in s:
		ans = False
if ans:
	print('Good')
else:
	print('Bad')


w = input()
print('GBoaodd'[1 ^ (w[0] != w[1] != w[2] != w[3])::2])


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


from itertools import groupby
print('Bad' if len(list(groupby(input()))) < 4 else 'Good')


w = input()
print('BGaodo d'[w[0] != w[1] != w[2] != w[3]::2])


s = input()
bl = 1 in (len(set(x)) for x in zip(s, s[1:]))
print('Bad' if bl else 'Good')


print((lambda x: sum([i == j for (i, j) in zip(x[1:], x[:3])]) and 'Bad' or 'Good')(input()))


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


s = input()
print('GBoaodd'[any((x == y for (x, y) in zip(s, s[1:])))::2])


n = input()
print('Bad' if any((n[i] == n[i - 1] for i in range(1, 4))) else 'Good')


n = input()
if any((n[i] == n[i + 1] for i in range(0, 3))):
	print('Bad')
else:
	print('Good')


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


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


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


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


pre = ''
for i in input():
	if i == pre:
		print('Bad')
		break
	pre = i
else:
	print('Good')


S = input()
print(['Good', 'Bad'][S[0] == S[1] or S[1] == S[2] or S[2] == S[3]])


import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal
import functools

def v():
	return input()

def k():
	return int(input())

def S():
	return input().split()

def I():
	return map(int, input().split())

def X():
	return list(input())

def L():
	return list(input().split())

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

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 6)
mod = 10 ** 9 + 7
cnt = 0
ans = 0
inf = float('inf')
al = 'abcdefghijklmnopqrstuvwxyz'
AL = al.upper()
s = v()
for i in range(len(s) - 1):
	if s[i] == s[i + 1]:
		print('Bad')
		return
print('Good')


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


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


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

def __starting_point():
	main()
__starting_point()


s = input()
print(['Good', 'Bad'][any((len(set(s[i:i + 2])) == 1 for i in range(3)))])


s = input()
a = [eval(s[i + 1] + '-' + s[i]) for i in range(3)]
print('GBoaodd'[a.count(0) != 0::2])


S = input()
bad = any((a == b for (a, b) in zip(S, S[1:])))
print('Bad' if bad else 'Good')


s = input()
l = [s for (s, t) in zip(s, s[1:]) if s == t]
print('Bad' if len(l) else 'Good')


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


a = input()
if a.count('00') > 0:
	print('Bad')
elif a.count('11') > 0:
	print('Bad')
elif a.count('22') > 0:
	print('Bad')
elif a.count('33') > 0:
	print('Bad')
elif a.count('44') > 0:
	print('Bad')
elif a.count('55') > 0:
	print('Bad')
elif a.count('66') > 0:
	print('Bad')
elif a.count('77') > 0:
	print('Bad')
elif a.count('88') > 0:
	print('Bad')
elif a.count('99') > 0:
	print('Bad')
else:
	print('Good')


S = input()
code_list = []
for code in S:
	code_list.append(code)
answer = code_list[0] != code_list[1] != code_list[2] != code_list[3]
if answer:
	print('Good')
else:
	print('Bad')


s = input()
print('Good' if all((c != d for (c, d) in zip(s[:-1], s[1:]))) else 'Bad')


S = input()
print('GBoaodd'[any((S[i] == S[i + 1] for i in range(3)))::2])


s = input()
tmp1 = s[0]
for i in range(1, len(s)):
	tmp2 = s[i]
	if tmp1 == tmp2:
		print('Bad')
		return
	else:
		tmp1 = tmp2
print('Good')


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