let security s =
  let a, b, c, d = (s / 1000, (s / 100)  mod 10, (s / 10)  mod 10, s mod 10)
  in
    if a <> b && b <> c && c <> d then "Good" else "Bad"

let () = Printf.printf "%s\n" (security (read_int()))
