fun main(args: Array<String>) {
    val s = readLine()!!
    //val (n,x) = readLine()!!.split(" ").map { s -> s.toInt() }
    //val L = readLine()!!.split(" ").map { s -> s.toInt() }
    val result = if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3]) "Bad" else "Good"
    println(result)
}