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

int main() {
    string s;
    while (cin >> s) { // 注意 while 处理多个 case
    int lastlen = s.size();
    int len = s.size()-1;
    while (s.size()>2) {
        if (lastlen==len) {
            break;
        }
        lastlen = s.size();
        for (int i =0; i<s.size()-1; i++) {
            if (s[i]=='a'&&s[i+1]=='b') {
                s.erase(s.begin()+i);
                s.erase(s.begin()+i);
            }
        }    
        len = s.size();
    }
    if (s[0]=='a'&&s[1]=='b') {
        cout<<"Good"<<endl;
    }else {
        cout<<"Bad"<<endl;
    }
    }
}
// 64 位输出请用 printf("%lld")