function Main (S) {
  S = String(S.split("\n")[0]).split("");
  if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3]) {
    console.log("Bad");
  }
  else {
    console.log("Good");
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));