
import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] a = new int[4];
        for(int i = 0 ; i < 4; i++){
            a[i] = n % 10;
            n /= 10;
        }
        System.out.println((a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) ? "Bad" : "Good");
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] a = new int[4];
        for(int i = 0 ; i < 4; i++){
            a[i] = n % 10;
            n /= 10;
        }
        System.out.println((a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) ? "Bad" : "Good");
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] a = new int[4];
        for(int i = 0 ; i < 4; i++){
            a[i] = n % 10;
            n /= 10;
        }
        System.out.println((a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) ? "Bad" : "Good");
    } main {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] a = new int[4];
        for(int i = 0 ; i < 4; i++){
            a[i] = n % 10;
            n /= 10;
        }
        System.out.println((a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) ? "Bad" : "Good");
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int[] a = new int[4]; a new int[4] 4 for(int i = 0 ; i < 4; i++){
            a[i] = n % 10;
            n /= 10;
        } int i = 0 ; int i = 0 ; i 0 i < 4 i 4 i++ i++ i {
            a[i] = n % 10;
            n /= 10;
        } {
            a[i] = n % 10;
            n /= 10;
        } a[i] = n % 10 a[i] a i n % 10 n 10 n /= 10 n 10 System.out.println((a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) ? "Bad" : "Good") System.out.println System.out System System.out (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) ? "Bad" : "Good" (a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) a[0] == a[1] || a[1] == a[2] || a[2] == a[3] a[0] == a[1] a[0] a 0 a[1] a 1 a[1] == a[2] a[1] a 1 a[2] a 2 a[2] == a[3] a[2] a 2 a[3] a 3 "Bad" "Good" String[] args args

import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] a = new int[4];
        for(int i = 0 ; i < 4; i++){
            a[i] = n % 10;
            n /= 10;
        }
        System.out.println((a[0] == a[1] || a[1] == a[2] || a[2] == a[3]) ? "Bad" : "Good");
    }
}