#include <bits/stdc++.h>

using namespace std;

int main () {
	int s;
	cin >> s;
	int a[4];
	a[0] = (s/1000)%10;
	a[1] = (s/100)%10;
	a[2] = (s/10)%10;
	a[3] = (s/1)%10;
	for (int i=0; i<3; i++){
		if (a[i] == a[i+1]) {
			cout << "Bad" << endl;
			return 0;
		}
	}
	cout << "Good" << endl;

	return 0;
}
