let inp : unit -> string = fun () -> 
  input_line stdin
let () =
  let s = inp () in
  let rec loop s n pred =
    if n = 0 then true
    else
      let a = s.[n - 1] in
      if a = pred then false
      else loop s (n - 1) a
  in
  if loop s 4 'a' then
    print_endline "Good"
  else
    print_endline "Bad"
