func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let s = Array(readLine()!)
    if s[0] == s[1] || s[1] == s[2] || s[2] == s[3] {
        print("Bad")
    } else {
        print("Good")
    }
}

main()
