import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		
		int intArray[] = new int[4];

		for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		}
		for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		}

		System.out.println("Good");


	    
   		sc.close();
        return ;

    }
    
}
 import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		
		int intArray[] = new int[4];

		for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		}
		for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		}

		System.out.println("Good");


	    
   		sc.close();
        return ;

    }
    
} Main public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		
		int intArray[] = new int[4];

		for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		}
		for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		}

		System.out.println("Good");


	    
   		sc.close();
        return ;

    } main {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		
		int intArray[] = new int[4];

		for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		}
		for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		}

		System.out.println("Good");


	    
   		sc.close();
        return ;

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int intArray[] = new int[4]; intArray new int[4] 4 for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		} int i = 0 ; int i = 0 ; i 0 i < 4 i 4 i++ i++ i {
			intArray[i] = a % 10;
			a = a / 10;
		} {
			intArray[i] = a % 10;
			a = a / 10;
		} intArray[i] = a % 10 intArray[i] intArray i a % 10 a 10 a = a / 10 a a / 10 a 10 for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		} int i = 0 ; int i = 0 ; i 0 i < 3 i 3 i++ i++ i {
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		} {
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		} if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			} intArray[i] == intArray[i+ 1] intArray[i] intArray i intArray[i+ 1] intArray i+ 1 i 1 {
				System.out.println("Bad");
				return ;
			} System.out.println("Bad") System.out.println System.out System System.out "Bad" return ; System.out.println("Good") System.out.println System.out System System.out "Good" sc.close() sc.close sc return ; String[] args args public class Main {

    public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		
		int intArray[] = new int[4];

		for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		}
		for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		}

		System.out.println("Good");


	    
   		sc.close();
        return ;

    }
    
} public class Main {

    public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		
		int intArray[] = new int[4];

		for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		}
		for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		}

		System.out.println("Good");


	    
   		sc.close();
        return ;

    }
    
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		
		int intArray[] = new int[4];

		for(int i = 0 ;i < 4;i++){
			intArray[i] = a % 10;
			a = a / 10;
		}
		for(int i = 0 ;i < 3;i++){
			if(intArray[i] == intArray[i+ 1]){
				System.out.println("Bad");
				return ;
			}	
		}

		System.out.println("Good");


	    
   		sc.close();
        return ;

    }
    
}

