import java.util.*;

public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int s=sc.nextInt();
      int x,y,z,w;

        z=s%10;

        y=(s-z)%100/10;

        x=(s-10*y-z)%1000/100;

        w=(s-100*x-10*y-z)%10000/1000;

///////////////////////////////////////////////////////////
        if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          System.out.println("Bad");
        }
        else{
          System.out.println("Good");
        }
///////////////////////////////////////////////////////////



    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int s=sc.nextInt();
      int x,y,z,w;

        z=s%10;

        y=(s-z)%100/10;

        x=(s-10*y-z)%1000/100;

        w=(s-100*x-10*y-z)%10000/1000;

///////////////////////////////////////////////////////////
        if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          System.out.println("Bad");
        }
        else{
          System.out.println("Good");
        }
///////////////////////////////////////////////////////////



    }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int s=sc.nextInt();
      int x,y,z,w;

        z=s%10;

        y=(s-z)%100/10;

        x=(s-10*y-z)%1000/100;

        w=(s-100*x-10*y-z)%10000/1000;

///////////////////////////////////////////////////////////
        if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          System.out.println("Bad");
        }
        else{
          System.out.println("Good");
        }
///////////////////////////////////////////////////////////



    } main {
      Scanner sc = new Scanner(System.in);

      int s=sc.nextInt();
      int x,y,z,w;

        z=s%10;

        y=(s-z)%100/10;

        x=(s-10*y-z)%1000/100;

        w=(s-100*x-10*y-z)%10000/1000;

///////////////////////////////////////////////////////////
        if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          System.out.println("Bad");
        }
        else{
          System.out.println("Good");
        }
///////////////////////////////////////////////////////////



    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s=sc.nextInt(); s sc.nextInt() sc.nextInt sc int x x y y z z w; w z=s%10 z s%10 s 10 y=(s-z)%100/10 y (s-z)%100/10 (s-z)%100 (s-z) s z 100 10 x=(s-10*y-z)%1000/100 x (s-10*y-z)%1000/100 (s-10*y-z)%1000 (s-10*y-z) s-10*y-z s 10*y 10 y z 1000 100 w=(s-100*x-10*y-z)%10000/1000 w (s-100*x-10*y-z)%10000/1000 (s-100*x-10*y-z)%10000 (s-100*x-10*y-z) 10*y s-100*x-10*y-z s 100*x 100 x 10*y 10 y z 10000 1000 if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          System.out.println("Bad");
        }
        else{
          System.out.println("Good");
        } w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z) (x==y&&y==z) (w==x&&x==y) y==z w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z) w==x w x x==y x y y==z y z (w==x&&x==y) w==x w x x==y x y (x==y&&y==z) x==y x y y==z y z (w==x&&x==y&&y==z) w==x&&x==y&&y==z w==x w x x==y x y y==z y z {
          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 s=sc.nextInt();
      int x,y,z,w;

        z=s%10;

        y=(s-z)%100/10;

        x=(s-10*y-z)%1000/100;

        w=(s-100*x-10*y-z)%10000/1000;

///////////////////////////////////////////////////////////
        if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          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 s=sc.nextInt();
      int x,y,z,w;

        z=s%10;

        y=(s-z)%100/10;

        x=(s-10*y-z)%1000/100;

        w=(s-100*x-10*y-z)%10000/1000;

///////////////////////////////////////////////////////////
        if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          System.out.println("Bad");
        }
        else{
          System.out.println("Good");
        }
///////////////////////////////////////////////////////////



    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int s=sc.nextInt();
      int x,y,z,w;

        z=s%10;

        y=(s-z)%100/10;

        x=(s-10*y-z)%1000/100;

        w=(s-100*x-10*y-z)%10000/1000;

///////////////////////////////////////////////////////////
        if(w==x || x==y || y==z || (w==x&&x==y) || (x==y&&y==z) || (w==x&&x==y&&y==z)){
          System.out.println("Bad");
        }
        else{
          System.out.println("Good");
        }
///////////////////////////////////////////////////////////



    }
}
