import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int S = scan.nextInt();
        int[] Sarray = new int[4];
      	for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        }
      	boolean f = false;
      	 for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        }
        if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int S = scan.nextInt();
        int[] Sarray = new int[4];
      	for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        }
      	boolean f = false;
      	 for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        }
        if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int S = scan.nextInt();
        int[] Sarray = new int[4];
      	for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        }
      	boolean f = false;
      	 for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        }
        if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int S = scan.nextInt();
        int[] Sarray = new int[4];
      	for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        }
      	boolean f = false;
      	 for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        }
        if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int S = scan.nextInt(); S scan.nextInt() scan.nextInt scan int[] Sarray = new int[4]; Sarray new int[4] 4 for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        } int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        } {
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        } Sarray[i] = (S/(int)Math.pow(10,i))%10 Sarray[i] Sarray i (S/(int)Math.pow(10,i))%10 (S/(int)Math.pow(10,i)) S (int)Math.pow(10,i) Math.pow Math 10 i 10 boolean f = false; f false for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        } int i= 1; int i= 1; i 1 i<4 i 4 i++ i++ i {
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        } {
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        } if(Sarray[i-1]==Sarray[i]){
                f = true;
            } Sarray[i-1]==Sarray[i] Sarray[i-1] Sarray i-1 i 1 Sarray[i] Sarray i {
                f = true;
            } f = true f true if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        } f==true f true {
            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 scan = new Scanner(System.in);
        int S = scan.nextInt();
        int[] Sarray = new int[4];
      	for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        }
      	boolean f = false;
      	 for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        }
        if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int S = scan.nextInt();
        int[] Sarray = new int[4];
      	for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        }
      	boolean f = false;
      	 for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        }
        if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int S = scan.nextInt();
        int[] Sarray = new int[4];
      	for(int i=0;i<4;i++){
        	Sarray[i] = (S/(int)Math.pow(10,i))%10;
        }
      	boolean f = false;
      	 for(int i= 1;i<4;i++){
            if(Sarray[i-1]==Sarray[i]){
                f = true;
            }
        }
        if(f==true){
            System.out.println("Bad");
        }else{
            System.out.println("Good");
        }
    }
}