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

string is_good_string(const string& s) {
    int a_count = 0, b_count = 0;
    for (char c : s) {
        if (c == 'a') {
            a_count++;
        } else if (c == 'b') {
            b_count++;
        }
        if (b_count > a_count) {
            return "Bad";
        }
    }
    return b_count == a_count ? "Good" : "Bad";
}

int main() {
    string s;
    cin >> s;
    cout << is_good_string(s) << endl;
    return 0;
}
// 64 位输出请用 printf("%lld")