import java.util.Scanner;

public class Main {
  public static String security(String num){
    char a = num.charAt(0);
    for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    }
    return "0";
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    System.out.println(security(a));
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static String security(String num){
    char a = num.charAt(0);
    for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    }
    return "0";
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    System.out.println(security(a));
  }
} Main public static String security(String num){
    char a = num.charAt(0);
    for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    }
    return "0";
  } security {
    char a = num.charAt(0);
    for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    }
    return "0";
  } char a = num.charAt(0); a num.charAt(0) num.charAt num 0 for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    } int i=1; int i=1; i 1 i<4 i 4 i++ i++ i {
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    } {
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    } char b = num.charAt(i); b num.charAt(i) num.charAt num i if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      } a == b a b return "Bad"; "Bad" {
        if(i != 3) a = b;
        else return "Good";
      } if(i != 3) a = b;
        else return "Good"; i != 3 i 3 a = b a b return "Good"; "Good" return "0"; "0" String num num public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    System.out.println(security(a));
  } main {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    System.out.println(security(a));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc System.out.println(security(a)) System.out.println System.out System System.out security(a) security a String[] args args public class Main {
  public static String security(String num){
    char a = num.charAt(0);
    for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    }
    return "0";
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    System.out.println(security(a));
  }
} public class Main {
  public static String security(String num){
    char a = num.charAt(0);
    for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    }
    return "0";
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    System.out.println(security(a));
  }
} Main
import java.util.Scanner;

public class Main {
  public static String security(String num){
    char a = num.charAt(0);
    for(int i=1; i<4; i++){
      char b = num.charAt(i);
      if(a == b) return "Bad";
      else{
        if(i != 3) a = b;
        else return "Good";
      }
    }
    return "0";
  }
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    System.out.println(security(a));
  }
}
