


# 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.
from queue import Queue







def  _lowerCamelCase(			lowercase__			)		->			Any:

		'''simple docstring'''







		__lowercase=    Queue()
		__lowercase=    [False] * len(lowercase__			)
		__lowercase=    [-1] * len(lowercase__			)

		def bfs():
				while not queue.empty():
						__lowercase=    queue.get()
						__lowercase=    True

						for neighbour in graph[u]:
								if neighbour == u:
										return False

								if color[neighbour] == -1:
										__lowercase=    1 - color[u]
										queue.put(lowercase__			)

								elif color[neighbour] == color[u]:
										return False

				return True

		for i in range(len(lowercase__			)			):
				if not visited[i]:
						queue.put(lowercase__			)
						__lowercase=    0
						if bfs() is False:
								return False

		return True


if __name__ == "__main__":
	# Adjacency List of graph
	print(check_bipartite({0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]}))










from __future__ import annotations

from enum import Enum





class    A					(     A_				):
							UpperCamelCase_     :							List[Any] =24
							UpperCamelCase_     :							List[Any] =21
							UpperCamelCase_     :							int =18
							UpperCamelCase_     :							Optional[int] =15
							UpperCamelCase_     :							Tuple =12
							UpperCamelCase_     :							List[str] =9
							UpperCamelCase_     :							Any =6
							UpperCamelCase_     :							List[str] =3
							UpperCamelCase_     :							str =2
							UpperCamelCase_     :							str =1
							UpperCamelCase_     :							Optional[int] =-1
							UpperCamelCase_     :							List[Any] =-2
							UpperCamelCase_     :							str =-3
							UpperCamelCase_     :							Tuple =-6
							UpperCamelCase_     :							Tuple =-9
							UpperCamelCase_     :							Optional[int] =-12
							UpperCamelCase_     :							str =-15
							UpperCamelCase_     :							Optional[Any] =-18
							UpperCamelCase_     :							Any =-21
							UpperCamelCase_     :							List[str] =-24





class    A					(     A_				):
							UpperCamelCase_     :							str =8
							UpperCamelCase_     :							Optional[Any] =7
							UpperCamelCase_     :							Tuple =6
							UpperCamelCase_     :							List[Any] =5
							UpperCamelCase_     :							Optional[Any] =4
							UpperCamelCase_     :							Union[str, Any] =3
							UpperCamelCase_     :							Union[str, Any] =2
							UpperCamelCase_     :							int =1







def  _lowerCamelCase(			lowercase__     ,				lowercase__     ,				lowercase__     ,				)		->			float:

		'''simple docstring'''







		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    SIUnit[known_prefix.lower()]
		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    SIUnit[unknown_prefix.lower()]
		__lowercase=    known_amount * (
		    1_0 ** (known_prefix.value - unknown_prefix.value)
		)
		return unknown_amount







def  _lowerCamelCase(			lowercase__     ,				lowercase__     ,				lowercase__     ,				)		->			float:

		'''simple docstring'''







		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    BinaryUnit[known_prefix.lower()]
		if isinstance(lowercase__     ,				lowercase__			):
				__lowercase=    BinaryUnit[unknown_prefix.lower()]
		__lowercase=    known_amount * (
		    2 ** ((known_prefix.value - unknown_prefix.value) * 1_0)
		)
		return unknown_amount


if __name__ == "__main__":
	import doctest

	doctest.testmod()






