import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = s / 1000;
        int b = s / 100 - 10 * a;
        int c = s / 10 - s / 100 * 10;
        int d = s - s / 10 * 10 ;
        if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = s / 1000;
        int b = s / 100 - 10 * a;
        int c = s / 10 - s / 100 * 10;
        int d = s - s / 10 * 10 ;
        if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = s / 1000;
        int b = s / 100 - 10 * a;
        int c = s / 10 - s / 100 * 10;
        int d = s - s / 10 * 10 ;
        if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = s / 1000;
        int b = s / 100 - 10 * a;
        int c = s / 10 - s / 100 * 10;
        int d = s - s / 10 * 10 ;
        if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int a = s / 1000; a s / 1000 s 1000 int b = s / 100 - 10 * a; b s / 100 - 10 * a s / 100 s 100 10 * a 10 a int c = s / 10 - s / 100 * 10; c s / 10 - s / 100 * 10 s / 10 s 10 s / 100 * 10 s / 100 s 100 10 int d = s - s / 10 * 10 ; d s - s / 10 * 10 s s / 10 * 10 s / 10 s 10 10 if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        } a == b || b == c || c == d a == b || b == c || c == d a == b a b b == c b c c == d c d {
            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" sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = s / 1000;
        int b = s / 100 - 10 * a;
        int c = s / 10 - s / 100 * 10;
        int d = s - s / 10 * 10 ;
        if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
        sc.close();
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = s / 1000;
        int b = s / 100 - 10 * a;
        int c = s / 10 - s / 100 * 10;
        int d = s - s / 10 * 10 ;
        if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
        sc.close();
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        int a = s / 1000;
        int b = s / 100 - 10 * a;
        int c = s / 10 - s / 100 * 10;
        int d = s - s / 10 * 10 ;
        if(a == b || b == c || c == d){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
        sc.close();
    }
}