#include <iostream>
using namespace std;

int main() {
    string s;
    getline(cin,s);
    cin.ignore();
    int ww=0;
    for(char c:s)
    {
        if(c=='a')
        {
            ww++;
        }else if(c=='b')
        {
            ww--;
        }
        if(ww<0)
        {
            cout<<"Bad"<<endl;
            return 0;
        }
    }
    if(ww==0)
    {
        cout<<"Good"<<endl;
    }
    else
    {
        cout<<"Bad"<<endl;
    }
    return 0;
}
// 64 位输出请用 printf("%lld")