import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String PIN = sc.next();
		String[] PINs = PIN.split("");
		int[] li = new int[4];
		for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String PIN = sc.next();
		String[] PINs = PIN.split("");
		int[] li = new int[4];
		for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String PIN = sc.next();
		String[] PINs = PIN.split("");
		int[] li = new int[4];
		for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String PIN = sc.next();
		String[] PINs = PIN.split("");
		int[] li = new int[4];
		for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String PIN = sc.next(); PIN sc.next() sc.next sc String[] PINs = PIN.split(""); PINs PIN.split("") PIN.split PIN "" int[] li = new int[4]; li new int[4] 4 for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		} int count=0; int count=0; count 0 count<4 count 4 count++ count++ count {
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		} {
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		} li[count] = Integer.parseInt(PINs[count]) li[count] li count Integer.parseInt(PINs[count]) Integer.parseInt Integer PINs[count] PINs count if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			} count>0&&li[count]==li[count-1] count>0 count 0 li[count]==li[count-1] li[count] li count li[count-1] li count-1 count 1 {
				System.out.println("Bad");
				break;
			} System.out.println("Bad") System.out.println System.out System System.out "Bad" break; if(count==3){
				System.out.println("Good");
			} count==3 count 3 {
				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);
		String PIN = sc.next();
		String[] PINs = PIN.split("");
		int[] li = new int[4];
		for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String PIN = sc.next();
		String[] PINs = PIN.split("");
		int[] li = new int[4];
		for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		}
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String PIN = sc.next();
		String[] PINs = PIN.split("");
		int[] li = new int[4];
		for(int count=0;count<4;count++){
			li[count] = Integer.parseInt(PINs[count]);
			if(count>0&&li[count]==li[count-1]){
				System.out.println("Bad");
				break;
			}else if(count==3){
				System.out.println("Good");
			}
		}
	}
}