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));
     // 	if(array[0] == array[1] || array[1] == array[2]){
       // 	difficultFlag = 1; 
        //}
    }

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

}



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