


# A Bipartite Graph is a graph whose vertices can be divided into two independent sets,
# U and V such that every edge (u, v) either connects a vertex from U to V or a vertex
# from V to U. In other words, for every edge (u, v), either u belongs to U and v to V,
# or u belongs to V and v to U. We can also say that there is no edge that connects
# vertices of same set.






def 		lowercase_(  SCREAMING_SNAKE_CASE_	):


  '''simple docstring'''

  lowerCamelCase :					Tuple    =				[False] * len(SCREAMING_SNAKE_CASE_	)
  lowerCamelCase :					Any    =				[-1] * len(SCREAMING_SNAKE_CASE_	)

  def dfs(SCREAMING_SNAKE_CASE_      ,						SCREAMING_SNAKE_CASE_	):
    lowerCamelCase :					Optional[int]    =				True
    lowerCamelCase :					str    =				c
    for u in graph[v]:
      if not visited[u]:
        dfs(SCREAMING_SNAKE_CASE_      ,						1 - c	)

  for i in range(len(SCREAMING_SNAKE_CASE_	)	):
    if not visited[i]:
      dfs(SCREAMING_SNAKE_CASE_      ,						0	)

  for i in range(len(SCREAMING_SNAKE_CASE_	)	):
    for j in graph[i]:
      if color[i] == color[j]:
        return False

  return True


# Adjacency list of graph
_snake_case             =     {0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2], 4: []}







print(check_bipartite_dfs(graph))







from ..utils import DummyObject, requires_backends
class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Any     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Optional[int]     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      str     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      List[Any]     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Optional[int]     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Dict     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Dict     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Union[str, Any]     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Optional[int]     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Optional[Any]     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Any     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      Optional[Any]     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



class 	UpperCAmelCase_					(					metaclass=UpperCamelCase    ):

   '''simple docstring'''




   __A :      int     		=		["flax"]






   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(self						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )






   @classmethod
   def _snake_case    (		cls						,				*__A						,				**__A ):






     """simple docstring"""





     requires_backends(cls						,				["flax"] )



