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

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <bits/stdc++.h>
#define first f
#define second s
#define pb push_back
#define mp make_pair
#define eb emplace_back // is faster than push_back
#define all(cont) cont.begin(), cont.end()
#define INF (int)1e9
#define MEM(a, b) memset(a, (b), sizeof(a))
#define clr(x) x.clear()
#define gcd(x, y) __gcd(x, y) // atentie la cazul x = 0 y = 0
#define lsb(x) __builtin_ffs(x)
#define no_bits(x) __builtin_popcount(x)
#define trace(x) cout << '>' << #x << ':' << x << "\n"
#define trace2(x,y) cout<< '>' << #x << ':' << x << " | " << #y << ':' << y << "\n"
#define trace3(a,b,c) cout<<'>'<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define trace4(a,b,c,d) cout<<'>'<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"

using namespace std;

//shortcuts data types
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<char, char> pcc;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
//DS
typedef set<int> seti;
typedef multiset<int> mseti;
typedef map<int, int> mpii;
//and <=> &&, or <=> ||)

int main() {
	//fast i/o
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	//sol
	string s;
	cin >> s;
	bool ok = 1;
	for (int i = 1; i < 4; ++i)
		if (s[i] == s[i - 1])
			ok = 0;
	if (ok)
		cout << "Good";
	else
		cout << "Bad";

	system("pause");
	return 0;
}