import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = Integer.parseInt(sc.next());
        int[] S_each = new int[4];
        for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        }
        boolean check = false;
        for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        }
        if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("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 = Integer.parseInt(sc.next());
        int[] S_each = new int[4];
        for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        }
        boolean check = false;
        for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        }
        if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("Good");
        }
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = Integer.parseInt(sc.next());
        int[] S_each = new int[4];
        for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        }
        boolean check = false;
        for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        }
        if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("Good");
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int S = Integer.parseInt(sc.next());
        int[] S_each = new int[4];
        for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        }
        boolean check = false;
        for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        }
        if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("Good");
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int S = Integer.parseInt(sc.next()); S Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] S_each = new int[4]; S_each new int[4] 4 for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        } int i = 0; int i = 0; i 0 i < S_each.length i S_each.length S_each S_each.length i++ i++ i {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        } {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        } S_each[i] = S % 10 S_each[i] S_each i S % 10 S 10 if (i != 4) {
                S = (S - S_each[i]) / 10;
            } i != 4 i 4 {
                S = (S - S_each[i]) / 10;
            } S = (S - S_each[i]) / 10 S (S - S_each[i]) / 10 (S - S_each[i]) S S_each[i] S_each i 10 boolean check = false; check false for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        } int i = 0; int i = 0; i 0 i < S_each.length - 1 i S_each.length - 1 S_each.length S_each S_each.length 1 i++ i++ i {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        } {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        } if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            } S_each[i] == S_each[i + 1] S_each[i] S_each i S_each[i + 1] S_each i + 1 i 1 {
                check = true;
                break;
            } check = true check true break; if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("Good");
        } check {
            System.out.print("Bad");
        } System.out.print("Bad") System.out.print System.out System System.out "Bad" {
            System.out.print("Good");
        } System.out.print("Good") System.out.print 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 = Integer.parseInt(sc.next());
        int[] S_each = new int[4];
        for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        }
        boolean check = false;
        for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        }
        if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("Good");
        }
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = Integer.parseInt(sc.next());
        int[] S_each = new int[4];
        for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        }
        boolean check = false;
        for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        }
        if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("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 = Integer.parseInt(sc.next());
        int[] S_each = new int[4];
        for (int i = 0; i < S_each.length; i++) {
            S_each[i] = S % 10;
            if (i != 4) {
                S = (S - S_each[i]) / 10;
            }
        }
        boolean check = false;
        for (int i = 0; i < S_each.length - 1; i++) {
            if (S_each[i] == S_each[i + 1]) {
                check = true;
                break;
            }
        }
        if (check) {
            System.out.print("Bad");
        } else {
            System.out.print("Good");
        }
        sc.close();
    }
}
