import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[4];
		for (int i = 3; i>=0; i--) {
			a[i] = n%10;
			n/=10;
		}
		if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) {
			System.out.println("Bad");
		} else {
			System.out.println("Good");
		}
	}
} import java.util.*; util.* java import java.io.*; io.* java import java.lang.*; lang.* java public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[4];
		for (int i = 3; i>=0; i--) {
			a[i] = n%10;
			n/=10;
		}
		if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) {
			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];
		for (int i = 3; i>=0; i--) {
			a[i] = n%10;
			n/=10;
		}
		if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) {
			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];
		for (int i = 3; i>=0; i--) {
			a[i] = n%10;
			n/=10;
		}
		if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) {
			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 for (int i = 3; i>=0; i--) {
			a[i] = n%10;
			n/=10;
		} int i = 3; int i = 3; i 3 i>=0 i 0 i-- i-- i {
			a[i] = n%10;
			n/=10;
		} {
			a[i] = n%10;
			n/=10;
		} a[i] = n%10 a[i] a i n%10 n 10 n/=10 n 10 if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) {
			System.out.println("Bad");
		} else {
			System.out.println("Good");
		} a[0] == a[1] || a[1] == a[2] || a[2] == a[3] a[0] == a[1] || a[1] == a[2] || a[2] == a[3] a[0] == a[1] a[0] a 0 a[1] a 1 a[1] == a[2] a[1] a 1 a[2] a 2 a[2] == a[3] a[2] a 2 a[3] a 3 {
			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];
		for (int i = 3; i>=0; i--) {
			a[i] = n%10;
			n/=10;
		}
		if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) {
			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];
		for (int i = 3; i>=0; i--) {
			a[i] = n%10;
			n/=10;
		}
		if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) {
			System.out.println("Bad");
		} else {
			System.out.println("Good");
		}
	}
} Main
import java.util.*;
import java.io.*;
import java.lang.*;

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