function Main(input) {
  var one = input.slice(0,1);
  var two = input.slice(1,2);
  var three = input.slice(2,3);
  var four = input.slice(3,4);
  
  if(one == two || two == three || three == four){
     console.log("Bad");
     }else{
       console.log("Good");
     }
  
}

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