program sc
  implicit none
  integer :: i,muzu
  character(len=4) :: S

  read(*,*) S
  muzu=0
  do i=1,3
     if(S(i:i).eq.S(i+1:i+1)) then
        muzu=1
     endif
  enddo
  if(muzu.eq.0) then
     write(*,'(a)') 'Good'
  else
     write(*,'(a)') 'Bad'
  endif



end program sc