program prob1
    implicit none
    character(len=4)::S
    integer::i
    read(*,*) S

    do i = 1,3
        if(S(i:i) .eq. S(i+1:i+1))then
            write(*,*) "Bad"
            stop
        end if
    end do
    write(*,*) "Good"
    stop
end program prob1