let i_inp : unit -> int = fun () ->
  int_of_string (input_line stdin)
let () =
  let s = i_inp () in
  let rec loop s n pred =
    if n = 0 then true
    else if s = 0 then false
    else
      let a = s mod 10 in
      if a = pred then false
      else loop (s / 10) (n - 1) a
  in
  if loop s 4 (-1) then
    print_endline "Good"
  else
    print_endline "Bad"
      