import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int s = scan.nextInt();
    difficulty(s, 4);
  }

  public static void difficulty(int num, int left) {
    int last = num % 10;
    int rest = num / 10;

    if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int s = scan.nextInt();
    difficulty(s, 4);
  }

  public static void difficulty(int num, int left) {
    int last = num % 10;
    int rest = num / 10;

    if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    }
  }
} Main public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int s = scan.nextInt();
    difficulty(s, 4);
  } main {
    Scanner scan = new Scanner(System.in);
    int s = scan.nextInt();
    difficulty(s, 4);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int s = scan.nextInt(); s scan.nextInt() scan.nextInt scan difficulty(s, 4) difficulty s 4 String[] args args public static void difficulty(int num, int left) {
    int last = num % 10;
    int rest = num / 10;

    if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    }
  } difficulty {
    int last = num % 10;
    int rest = num / 10;

    if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    }
  } int last = num % 10; last num % 10 num 10 int rest = num / 10; rest num / 10 num 10 if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    } rest == 0 && left == 1 rest == 0 rest 0 left == 1 left 1 {
      System.out.println("Good");
    } System.out.println("Good") System.out.println System.out System System.out "Good" if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    } last == rest % 10 last rest % 10 rest 10 {
      System.out.println("Bad");
    } System.out.println("Bad") System.out.println System.out System System.out "Bad" {
      difficulty(rest, left - 1);
    } difficulty(rest, left - 1) difficulty rest left - 1 left 1 int num num int left left public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int s = scan.nextInt();
    difficulty(s, 4);
  }

  public static void difficulty(int num, int left) {
    int last = num % 10;
    int rest = num / 10;

    if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int s = scan.nextInt();
    difficulty(s, 4);
  }

  public static void difficulty(int num, int left) {
    int last = num % 10;
    int rest = num / 10;

    if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    }
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int s = scan.nextInt();
    difficulty(s, 4);
  }

  public static void difficulty(int num, int left) {
    int last = num % 10;
    int rest = num / 10;

    if (rest == 0 && left == 1) {
      System.out.println("Good");
    } else if (last == rest % 10) {
      System.out.println("Bad");
    } else {
      difficulty(rest, left - 1);
    }
  }
}
