import java.util.*;
import java.util.Arrays;
public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] a = new int[4];
    
        a[0] = n%10;
        n /=10;
        a[1] = n%10;
        n /=10;
        a[2] = n%10;
        n /=10;
        a[3] = n;
        int [] b = new int [4];
        for(int i=0;i<4;i++){
            b[i] = a[3-i];
        }
        
        


        int p=0;
        
        for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        }
        if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        }
    }
} import java.util.*; util.* java import java.util.Arrays; Arrays java.util public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] a = new int[4];
    
        a[0] = n%10;
        n /=10;
        a[1] = n%10;
        n /=10;
        a[2] = n%10;
        n /=10;
        a[3] = n;
        int [] b = new int [4];
        for(int i=0;i<4;i++){
            b[i] = a[3-i];
        }
        
        


        int p=0;
        
        for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        }
        if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] a = new int[4];
    
        a[0] = n%10;
        n /=10;
        a[1] = n%10;
        n /=10;
        a[2] = n%10;
        n /=10;
        a[3] = n;
        int [] b = new int [4];
        for(int i=0;i<4;i++){
            b[i] = a[3-i];
        }
        
        


        int p=0;
        
        for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        }
        if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] a = new int[4];
    
        a[0] = n%10;
        n /=10;
        a[1] = n%10;
        n /=10;
        a[2] = n%10;
        n /=10;
        a[3] = n;
        int [] b = new int [4];
        for(int i=0;i<4;i++){
            b[i] = a[3-i];
        }
        
        


        int p=0;
        
        for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        }
        if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int [] a = new int[4]; a new int[4] 4 a[0] = n%10 a[0] a 0 n%10 n 10 n /=10 n 10 a[1] = n%10 a[1] a 1 n%10 n 10 n /=10 n 10 a[2] = n%10 a[2] a 2 n%10 n 10 n /=10 n 10 a[3] = n a[3] a 3 n int [] b = new int [4]; b new int [4] 4 for(int i=0;i<4;i++){
            b[i] = a[3-i];
        } int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
            b[i] = a[3-i];
        } {
            b[i] = a[3-i];
        } b[i] = a[3-i] b[i] b i a[3-i] a 3-i 3 i int p=0; p 0 for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        } {
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        } if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            } b[i]==b[i+1] b[i] b i b[i+1] b i+1 i 1 {
                p = 1;
            } p = 1 p 1 if(b[2]==b[3]){
                p=1;
            } b[2]==b[3] b[2] b 2 b[3] b 3 {
                p=1;
            } p=1 p 1 if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        } p==1 p 1 {
            System.out.println("Bad");
        } System.out.println("Bad") System.out.println System.out System System.out "Bad" {
            System.out.println("Good");

        } System.out.println("Good") System.out.println System.out System System.out "Good" String[] args args public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] a = new int[4];
    
        a[0] = n%10;
        n /=10;
        a[1] = n%10;
        n /=10;
        a[2] = n%10;
        n /=10;
        a[3] = n;
        int [] b = new int [4];
        for(int i=0;i<4;i++){
            b[i] = a[3-i];
        }
        
        


        int p=0;
        
        for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        }
        if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        }
    }
} public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] a = new int[4];
    
        a[0] = n%10;
        n /=10;
        a[1] = n%10;
        n /=10;
        a[2] = n%10;
        n /=10;
        a[3] = n;
        int [] b = new int [4];
        for(int i=0;i<4;i++){
            b[i] = a[3-i];
        }
        
        


        int p=0;
        
        for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        }
        if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        }
    }
} Main
import java.util.*;
import java.util.Arrays;
public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int [] a = new int[4];
    
        a[0] = n%10;
        n /=10;
        a[1] = n%10;
        n /=10;
        a[2] = n%10;
        n /=10;
        a[3] = n;
        int [] b = new int [4];
        for(int i=0;i<4;i++){
            b[i] = a[3-i];
        }
        
        


        int p=0;
        
        for(int i=0;i<3;i++){
            if(b[i]==b[i+1]){
                p = 1;
            }
            else if(b[2]==b[3]){
                p=1;
            }
             
            
        }
        if(p==1){
            System.out.println("Bad");
        }
        else {
            System.out.println("Good");

        }
    }
}