#include <iostream>
#include <stack>
using namespace std;

bool check(string s){
    stack<char> st;
    for(int i=0;i<s.length();i++){
        if(s[i]=='a'){
            st.push(s[i]);
        }
        else if(s[i]=='b'){
            if(st.empty()){
                return 0;
            }
            st.pop();
        }
    }
    return st.empty();
}

int main() {
    string s;
    cin>>s;
    if(check(s)) cout<<"Good";
    else cout<<"Bad";
    return 0;
}
// 64 位输出请用 printf("%lld")