Problem:
Score : 100 points

Problem Statement

The door of Snuke's laboratory is locked with a security code.

The security code is a 4-digit number. We say the security code is hard to enter when it contains two consecutive digits that are the same.

You are given the current security code S. If S is hard to enter, print Bad; otherwise, print Good.

Constraints

S is a 4-character string consisting of digits.

Input

Input is given from Standard Input in the following format:

S

Output

If S is hard to enter, print Bad; otherwise, print Good.

Sample Input 1

3776

Sample Output 1

Bad

The second and third digits are the same, so 3776 is hard to enter.

Sample Input 2

8080

Sample Output 2

Good

There are no two consecutive digits that are the same, so 8080 is not hard to enter.

Sample Input 3

1333

Sample Output 3

Bad

Sample Input 4

0024

Sample Output 4

Bad

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using static System.Math;
using static System.Console;

using static CPL.Input.IO;
using CPL.Input;
using CPL.Collections;
using CPL.String;

namespace ABC131A
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var s = ReadLine().Trim().ToCharArray();

            string a = "Good";
            for (int i = 1; i < s.Length; i++)
            {
                if (s[i - 1] == s[i])
                {
                    a = "Bad";
                    break;
                }
            }
            
            
            WriteLine(a);
        }
    }
}


namespace CPL
{
    namespace Input
    {
        public static class IO
        {
            public static T RL<T>()
            {
                return Console.ReadLine().Trim().TryParse<T>();
            }

            public static List<T> RLL<T>()
            {
                return Console.ReadLine().TrySplitParseToList<T>();
            }

            public static void WL(string s)
            {
                Console.WriteLine(s);
            }

            public static void WL(int s)
            {
                Console.WriteLine(s);
            }

            public static void WL(double s)
            {
                Console.WriteLine(s);
            }
        }

        public static class InputEx
        {

            public static T TryParse<T>(this string input)
            {
                try
                {
                    var converter = TypeDescriptor.GetConverter(typeof(T));
                    return (T)converter.ConvertFromString(input);
                }
                catch
                {
                    throw new InvalidCastException(typeof(T) + " is not supported.");
                }
            }

            public static List<T> TrySplitParseToList<T>(this string input, char separator = ' ')
            {
                return input.Split(separator).Select(TryParse<T>).ToList();
            }

            public static List<T> ReadLineOne<T>(int n)
            {
                return Enumerable.Range(1, n).Select(i => Console.ReadLine().TryParse<T>()).ToList();
            }
        }
    }

    namespace Collections
    {
        public static class CollectionsEx
        {
            public static List<Tuple<T, int>> DuplicateCount<T>(this IEnumerable<T> list)
            {
                return list
                    .GroupBy(i => i)
                    .Select(g => Tuple.Create(g.Key, g.Count()))
                    .ToList();
            }

            public static List<Tuple<T, int>> DuplicateOrderByDescending<T>(this IEnumerable<Tuple<T, int>> list)
            {
                return list.OrderByDescending(x => x.Item2).ToList();
            }

            public static List<T> ListSwap<T>(this List<T> list, int index1, int index2)
            {
                var t = list[index1];
                list[index1] = list[index2];
                list[index2] = t;
                return list;
            }

            public static void PrintAll<T>(this IEnumerable<T> list)
            {
                foreach (var i in list)
                {
                    Console.Write($"{i} ");
                }
            }
        }
    }

    namespace String
    {
        public static class StringEx
        {
            public static string Reversed(this string s)
            {
                return string.Join("", s.Reverse());
            }
        }
    }


}