import java.util.Scanner;

public class Main{
	public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
      int S=sc.nextInt();
      int a=S%10;
      int b=S%100;
      int c=S%1000;
      
      if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	System.out.println("Bad");
      }else{
        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);
      int S=sc.nextInt();
      int a=S%10;
      int b=S%100;
      int c=S%1000;
      
      if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	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 a=S%10;
      int b=S%100;
      int c=S%1000;
      
      if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	System.out.println("Bad");
      }else{
        System.out.println("Good");
      }
      
    
    
    
    
    } main {
    Scanner sc=new Scanner(System.in);
      int S=sc.nextInt();
      int a=S%10;
      int b=S%100;
      int c=S%1000;
      
      if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	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 a=S%10; a S%10 S 10 int b=S%100; b S%100 S 100 int c=S%1000; c S%1000 S 1000 if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	System.out.println("Bad");
      }else{
        System.out.println("Good");
      } (S-c)/1000==(c-b)/100 (S-c)/1000 (S-c) S c 1000 (c-b)/100 (c-b) c b 100 {
      	System.out.println("Bad");
      } System.out.println("Bad") System.out.println System.out System System.out "Bad" if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	System.out.println("Bad");
      }else{
        System.out.println("Good");
      } (c-b)/100==(b-a)/10 (c-b)/100 (c-b) c b 100 (b-a)/10 (b-a) b a 10 {
      	System.out.println("Bad");
      } System.out.println("Bad") System.out.println System.out System System.out "Bad" if((b-a)/10==a){
      	System.out.println("Bad");
      }else{
        System.out.println("Good");
      } (b-a)/10==a (b-a)/10 (b-a) b a 10 a {
      	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 a=S%10;
      int b=S%100;
      int c=S%1000;
      
      if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	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 a=S%10;
      int b=S%100;
      int c=S%1000;
      
      if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	System.out.println("Bad");
      }else{
        System.out.println("Good");
      }
      
    
    
    
    
    }
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[]args){
    Scanner sc=new Scanner(System.in);
      int S=sc.nextInt();
      int a=S%10;
      int b=S%100;
      int c=S%1000;
      
      if ((S-c)/1000==(c-b)/100){
      	System.out.println("Bad");
      }else if((c-b)/100==(b-a)/10){
      	System.out.println("Bad");
      }else if((b-a)/10==a){
      	System.out.println("Bad");
      }else{
        System.out.println("Good");
      }
      
    
    
    
    
    }
}