#include<bits/stdc++.h>
using namespace std;
string s;stack<char>S;
int main(){
    cin>>s;
    for (char c:s) {
    if (c=='a') {
    S.push(c);
    }if (c=='b') {
    if (S.empty()) {
    cout<<"Bad";return 0;
    }else {
    S.pop();
    }
    }
    }
    if (S.empty()) {
    cout<<"Good";
    }else {
    cout<<"Bad";
    }
    return 0;
}