function Main(input) {
    var S = input.trim();
    if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3]) {
        console.log("Bad");
    }
    else {
        console.log("Good");
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));