program security
  implicit none
  character(4) :: s
  read(*,*) s
  if (s(1:1).eq.s(2:2).or.s(2:2).eq.s(3:3).or.s(3:3).eq.s(4:4)) then
    write(*,'(a)') "Bad"
  else
    write(*,'(a)') "Good"
  end if
  stop
end program security