function Main(input){
	var array = [];
	var difficultFlag = 0;
  	var threeNumbers = [];
	for(var i = 0; i<input.length;i++){	
		array.push(input.slice(i,i+1));
    }
  	var intArray = array.map(i=>parseInt(i));

  	for(var j = 0;j<2;j++){
		threeNumbers.push(intArray.slice(j,j+3));      
    }
  	if(threeNumbers[0][0] == threeNumbers[0][1] || threeNumbers[0][1] == threeNumbers[0][2]){
    	difficultFlag = 1;
    }else if(threeNumbers[1][0] == threeNumbers[1][1] || threeNumbers[1][1] == threeNumbers[1][2]){
        difficultFlag = 1;
    }
  
  	if(difficultFlag == 1){
     console.log('Bad'); 
    }else{
     console.log('Good'); 
    }

}



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