import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val s = sc.nextInt()

    println(abc131a(s))
}

private fun abc131a(s: Int): String {
    var ans = "Good"
    var a = s / 1000
    var b = s % 1000 / 100
    var c = s % 100 / 10
    var d = s % 10

    if (a == b || b == c || c == d ) {
        ans = "Bad"
    }

    return ans
}