import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int S = sc.nextInt();

		int a = S / 1000;
		int b = S % 1000 / 100;
		int c = S % 1000 % 100 / 10;
		int d = S % 1000 % 100 % 10;

		if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("Good");
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int S = sc.nextInt();

		int a = S / 1000;
		int b = S % 1000 / 100;
		int c = S % 1000 % 100 / 10;
		int d = S % 1000 % 100 % 10;

		if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("Good");
		}

	}
} Main public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int S = sc.nextInt();

		int a = S / 1000;
		int b = S % 1000 / 100;
		int c = S % 1000 % 100 / 10;
		int d = S % 1000 % 100 % 10;

		if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("Good");
		}

	} main {

		Scanner sc = new Scanner(System.in);

		int S = sc.nextInt();

		int a = S / 1000;
		int b = S % 1000 / 100;
		int c = S % 1000 % 100 / 10;
		int d = S % 1000 % 100 % 10;

		if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("Good");
		}

	} 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 % 1000 / 100; b S % 1000 / 100 S % 1000 S 1000 100 int c = S % 1000 % 100 / 10; c S % 1000 % 100 / 10 S % 1000 % 100 S % 1000 % 100 S 1000 100 10 int d = S % 1000 % 100 % 10; d S % 1000 % 100 % 10 100 S % 1000 % 100 % 10 S 1000 100 10 if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("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.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" String arg[] arg public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int S = sc.nextInt();

		int a = S / 1000;
		int b = S % 1000 / 100;
		int c = S % 1000 % 100 / 10;
		int d = S % 1000 % 100 % 10;

		if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("Good");
		}

	}
} public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int S = sc.nextInt();

		int a = S / 1000;
		int b = S % 1000 / 100;
		int c = S % 1000 % 100 / 10;
		int d = S % 1000 % 100 % 10;

		if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("Good");
		}

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int S = sc.nextInt();

		int a = S / 1000;
		int b = S % 1000 / 100;
		int c = S % 1000 % 100 / 10;
		int d = S % 1000 % 100 % 10;

		if (a == b || b == c || c == d) {
			System.out.print("Bad");
		} else {
			System.out.print("Good");
		}

	}
}