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

int main() {
    string str;
    cin>>str;
    int len=str.length();
    if(len%2!=0){
        cout<<"Bad";
        return 0;
    }
    stack<char> ms;
    for(int i=0;i<len;i++){
        switch (str[i]) {
            //a入栈,b不入
            case 'a':
                ms.push(str[i]);
                break;
            case 'b':
            //栈只有空错,有a两种情况。
                if(!ms.empty()){
                    ms.pop();
                }
                else {
                    cout<<"Bad";
                    return 0;
                }
                break;
            default:
                cout<<"Bad";
                return 0;
                break;
        }
    }
    if(ms.empty()){
        cout<<"Good";
    }
    else {
        cout<<"Bad";
    }
    return 0;
}
// 64 位输出请用 printf("%lld")