program abc131a
  implicit none
  character(len=4, kind=1) :: s
  integer :: i
  logical :: isGood= .True.
  read(*,*) s


  do i = 1, 3
    if ( s(i:i) == s(i+1:i+1) ) then
      isGood = .False.
    endif
  enddo

  if (isGood) then
    print *, 'Good'
  else
    print *, 'Bad'
  endif

end program abc131a
