'use strict'
function main(input) {
    let prevNum = input[0];
    for (let digit = 1; digit < 4; digit++) {
        if (input[digit] === prevNum) {
            console.log("Bad");
            break;
        }
        if (digit === 3) {
            console.log("Good");
        }
        prevNum = input[digit];
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));