#include <iostream>
#include <stack>
#include <string>

using namespace std;
stack<char> tmp;
string x;


int main() {
    cin >> x;
    for (int i = 0; i < x.size(); i++) {
        if (x[i] == 'a') {
            tmp.push('a');
        }
        else if (x[i] == 'b' && !tmp.empty() && tmp.top()=='a') {
            tmp.pop();
        } else {
            cout << "Bad";
            return 0;
        }
    }
    if (tmp.empty())cout << "Good";
    else cout << "Bad";
}
// 64 位输出请用 printf("%lld")