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

Solution code:
a=[int(input().split())]
for i in a:
    if a[i] == a[i+1]:
        print("Bad")
    else:
        print("Good")

Submission status: Runtime Error

Solution code:
S = input()
S = str(S)
flag = True

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

Submission status: Runtime Error

Solution code:
import collections as c
# from fractions import gcd
from math import gcd
ip = lambda : map(int, input().split())
# ##############
mod = 1e9+7
S = input()
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        exit()
print('Good')

Submission status: Runtime Error

Solution code:
string = input().split()
for i in range(len(string) - 1):
  if string[i] == string[i+1]
  	return print('Bad')
  
return print('Good')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
password = input()

result = 'Good'

for i in range(len(password)-1):
  ):
    if password[i] == password[i+1]:
      result = 'Bad'
      break
      
print(result)

Submission status: Runtime Error

Solution code:
S = input()
dig = 0
dig_pre = 0
flag = True


for i in range(4):
    dig = S % 10
    if i>0:
        if(dig == dig_pre):
            flag = False
            break
    dig_pre = dig
    S = S/10

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = map(int,input())
b=a%10
c=(a-b)/10
judg="Good"
for i in range(4):
    if b==c%10:
        judg="Bad"
    else:
        b=c%10
        c=(c-b)/10
print(judg)

Submission status: Runtime Error

Solution code:
a=str(nput())
b=''
r='Good'
for c in a:
    if b == c:
        r='Bad'
        break
    else:
        b = c
print(r)

Submission status: Runtime Error

Solution code:
a,b,c,d = input()
pass = [int(a),int(b),int(c),int(d)]

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

Submission status: Runtime Error

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

N,L=map(int, input().split())

ans = 0
for i in range(N):
    ans = ans + L + i

if L > 0:
    ans = ans - L
if (L + N - 1) < 0:
    ans = ans - (L + N - 1)

print(ans)

Submission status: Runtime Error

Solution code:
a = map(int,input().split())
b=a%10
c=(a-b)/10
judg="Good"
for i in range(4):
    if b==c%10:
        judg="Bad"
    else:
        b=c%10
        c=(c-b)/10
print(judg)

Submission status: Runtime Error

Solution code:
abcd = int(input())
d = abcd % 10
c = int(((abcd - d) % 100)/10)
b = (abcd - c*10 - d)%1000
a = int(abcd / 1000)

s = "Good"
if(a == b){
  s = "Bad"
}
if(b = c){
  s = "Bad"
}
if(c == d){
  s = "Bad"
}

print(s)

Submission status: Runtime Error

Solution code:
N = list(map(int,input()))
bool = 0
for i in range(len(N) - 1):
    if N[i] != N[i+1]:
        bool = 1
if bool = 1:
    print("Good")
else:
    print("Bad")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input_number = int(input())

a = input_number//1000
b = (input_number-1000*a)//100
c = (input_number-1000*a-100*b)//10
d = input_number-1000*a-100*b-c*10
if a==b;
	print('Bad')
elif b==c;
	print('Bad')
elif c==d;
	print('Bad')
else:
    print('Good')

Submission status: Runtime Error

Solution code:
S = str(input())
cnt = 0
for i in range(len(S)):
    if S[i] == S[i+1]:
        print("Bad")
        exit()
print("Good")

Submission status: Runtime Error

Solution code:
x = input().rstrip().split("")
count = 0
temp = ""
how = True
for i in x:
  if temp == i:
    how=False
  temp = i

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

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
if a==b or b==c or c==d:
  print("Bad")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
N = list(map(int,input()))
for i in len(N - 1):
    if N[i] == N[i+1]:
        print("Good")
    else :
        print("Bad")

Submission status: Runtime Error

Solution code:
S = int(input())
lst = []
while S > 0:
    lst.append(S%10)
    S //= 10 # 必須
if lst[0] == lst[1] or lst[1] == lst[2] or lst[2] == lst[3]:
  print("Bad")
else:
  print("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c,d=int(input().split())
if a==b or b==c or c==d:
  print("Bad")
else:
  print("Yes")

Submission status: Runtime Error

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

def afunc(a,b,c,d):
  alist = [a,b,c,d]
  pre = a
  for char in alist[1:3]:
    if pre == char:
      print("Bad")
      return
    else:
      pre = char
  print("Good")

afunc(a,b,c,d)

Submission status: Runtime Error

Solution code:
x = input()
x = str(x)
f = True

for i in range(1,3)
	if(x[i-1] == x[i])
  		f = False
    	break
   
if f:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
ans = 'Good'
last = s[0]
for i in s[1:]:
    if last==i:
        ans = 'Bad'
        reak
    last = i
print(ans)

Submission status: Runtime Error

Solution code:
import sys
S = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(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:
security_num = input()
pre_num = ""
    
for num in security_num:
	if pre_num == num: return "Bad"
	pre_num = num

return "Good"

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
if a =b or a=c or a=d or b =c or c = d or b= d:
  print("Good")
else:
  print("Bad")

Submission status: Runtime Error

Solution code:
S = input().split()

Flag = True

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

fin = sys.stdin.readline
num = str(int(fin()))

readable = True
prev_num = num[0]
for i in range(1, 4):
    cur_num = num[i]
    if prev_num == cur_num:
        readable = False
    prev_num = cur_num

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

int main (){
	string a;
	cin>>a;
	if(a[0]==a[1]||a[1]==a[2]||a[2]==a[3])cout<<"Bad\n";
	else cout<<"Good\n";
	return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
p = input().split()

for i in range(3):
  if p[i] == p[i + 1]:
    print("Bad")
    quit()
print("Good")

Submission status: Runtime Error

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

alist = [a,b,c,d]
pre = a
for char in alist[1:3]:
  if pre == char:
    print("Bad")
    return
  else:
    pre = char
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=input()
if s[0]==s[1] || s[1] == s[2] || s[2] == s[3]
	print("Bad")
else
  	print("Good")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input().sprit()

Flag = True

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

Submission status: Runtime Error

Solution code:
line=list(map(int,input().split()))

for i in range(3):
    if line(i)==line(i+1):
        print('Bad')
        break
    if i==2:
        print('Good')

Submission status: Runtime Error

Solution code:
pre = None
for i in list(input()):
	if i == pre:
      	print("Bad")
        exit()
    pre = i
print("Good")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
S = input()

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

print('Good')

Submission status: Runtime Error

Solution code:
s = 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 = gets.strip()

def check()
	(S.length - 1).times{|i|
		if S[i] == S[i + 1]
			return false
		end
	}
	return true
end

if check()
	puts "Good"
else
	puts "Bad"
end

Submission status: Runtime Error

Solution code:
pc = list(map(int, input().split("")))

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

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<math.h>

#define rep(i,a,n) for(int (i)=(a);(i)<(n);(i)++)
#define rrep(i,a,n) for(int (i)=(a);(i)>=(n);(i)--)

#define INF 1000000000
#define MOD 1000000007

typedef  long long ll;

using namespace std;

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

double euclid_distance(double a,double b){
    return sqrt(a*a+b*b);
}

ll gcd(ll  a,ll b){
    ll r;
    if(a < b){
        int tmp;
        tmp = a;
        a = b;
        b = tmp;
    }
    while(r = a % b){
        a = b;
        b = r;
    }
    return b;
}

void Integer_factorization(long long int b,long long int n){
    long long int a = 2;
    long long int count = 0;
    long long int ans = 1;
    long long int ndash = n;
    if(b == 1) cout << n << endl;
    else{
    while(ndash >= a*a){
        if(n % a  == 0){
            count++;
            n/=a;

        if(count % b == 0){
            ans *= a;
        }
        }else{a++;count = 0;}
    }

    cout<<  ans << endl;
    }
}

void solve() {
   string s;

   cin >> s;

   rep(i,0,s.size()-1){
       rep(j,i+1,s.size()){
           if(s[i] == s[j]){

           cout << "Bad";
           return;
           }
       }
   }

   cout << "Good" << endl;
}
int main() {

	cin.tie(0);
	ios::sync_with_stdio(false);

	solve();

	return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include "bits/stdc++.h"

int main() {

    std::string S;
    std::cin >> S;
    char prev = 0;
    bool ans = false;
    for (auto& v : S) {
        if (prev == v)ans = true;
        prev = v;
    }
    std::cout << (ans ? "Bad" : "Good") << std::endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

S = input()

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

Submission status: Runtime Error

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    n = input()
    if n[1] == n[2] or n[2] == n[3] or n[3] == n[4]:
        print("Bad")

    else:
        print("Good")


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Solution code:
#include<bits/stdc++.h>
using namespace std;

int main (){
	string a;
	cin>>a;
	if(a[0]==a[1]||a[1]=a[2]||a[2]=a[3])cout<<"Bad\n";
	else cout<<"Good\n";
	return 0;
}

Submission status: Runtime Error

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