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 = new int[4];
        for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        }

        String x = "Good";
        for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        }
        System.out.println(x);
    }
} 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 = new int[4];
        for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        }

        String x = "Good";
        for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        }
        System.out.println(x);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int S = sc.nextInt();

        int[] a = new int[4];
        for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        }

        String x = "Good";
        for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        }
        System.out.println(x);
    } main {
        Scanner sc = new Scanner(System.in);

        int S = sc.nextInt();

        int[] a = new int[4];
        for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        }

        String x = "Good";
        for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        }
        System.out.println(x);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int S = sc.nextInt(); S sc.nextInt() sc.nextInt sc int[] a = new int[4]; a new int[4] 4 for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        } {
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        } a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i) a[i] a i S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i) S % (int)Math.pow(10, 4 - i) S (int)Math.pow(10, 4 - i) Math.pow Math 10 4 - i 4 i (int)Math.pow(10, 3 - i) Math.pow Math 10 3 - i 3 i String x = "Good"; x "Good" for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        } int i = 0; int i = 0; i 0 i < a.length - 1 i a.length - 1 a.length a a.length 1 i++ i++ i {
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        } {
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        } if(a[i] == a[i + 1]){
                x = "Bad";
            } a[i] == a[i + 1] a[i] a i a[i + 1] a i + 1 i 1 {
                x = "Bad";
            } x = "Bad" x "Bad" System.out.println(x) System.out.println System.out System System.out x String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int S = sc.nextInt();

        int[] a = new int[4];
        for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        }

        String x = "Good";
        for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        }
        System.out.println(x);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int S = sc.nextInt();

        int[] a = new int[4];
        for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        }

        String x = "Good";
        for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        }
        System.out.println(x);
    }
} 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 = new int[4];
        for(int i = 0;i < 4; i++){
            a[i] = S % (int)Math.pow(10, 4 - i) / (int)Math.pow(10, 3 - i);
        }

        String x = "Good";
        for(int i = 0; i < a.length - 1; i++){
            if(a[i] == a[i + 1]){
                x = "Bad";
            }
        }
        System.out.println(x);
    }
}
