{-# LANGUAGE BangPatterns #-}
import Control.Arrow
import Control.Monad.Fix
import Data.Char
import Data.Int
import Data.Foldable
import Data.List
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as VU
import qualified Data.ByteString.Char8 as B
import Debug.Trace

solve :: B.ByteString -> Bool
solve !b = b0 == b1 || b1 == b2 || b2 == b3
 where
  b0 = B.index b 0
  b1 = B.index b 1
  b2 = B.index b 2
  b3 = B.index b 3

main = do
  let readInt :: Integral a => B.ByteString -> Maybe (a, B.ByteString)
      readInt = fmap (first fromIntegral . second B.tail) . B.readInt

  s <- B.getLine
  putStrLn $ if solve s then "Bad" else "Good"
