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


string s;
stack<char> st; 

int main(){
	
	cin>>s;
	
	bool flag=true;
	
	for(int i=0;i<s.size();i++){
		if(s[i]=='a'){
			st.push(s[i]);
		}else{
			if(st.empty()||st.top()!='a'){
				flag=false;
				break;
			}else{
				st.pop();
			}
		}
	}
	
	if(!st.empty()){
		flag=false;
	}
	
	if(flag){
		cout<<"Good"<<endl;
	}else{
		cout<<"Bad"<<endl;
	}
    return 0;
}