#include<bits/stdc++.h>
using namespace std;
bool check(string s){
    int l=s.size();
    stack<char>arr;
    for(int i=0;i<l;i++){
        if(s[i]=='a'){
            arr.push(s[i]);
        }
        else if(s[i]=='b'){
            if(arr.empty()||arr.top()!='a')return false;
            arr.pop();//将栈顶元素弹出
        }
    }
    return arr.empty();//如果栈为空了,说明所有ab配对成功,此事为true
    
}
int main(){
    string s;
    cin>>s;
    if(check(s))cout<<"Good";
    else cout<<"Bad";

}