




# 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        __UpperCAmelCase						(							lowerCamelCase_ :     str  )       ->  Optional[int]:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : List[Any]					  =      [False] * len(lowerCamelCase_  )
			SCREAMING_SNAKE_CASE_   : str					  =      [-1] * len(lowerCamelCase_  )

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

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

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

			return True


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




print(check_bipartite_dfs(graph))









def        __UpperCAmelCase						(							lowerCamelCase_ :     str  )       ->  bool:







			"""simple docstring"""





			SCREAMING_SNAKE_CASE_   : Any					  =      0
			for ch in input_str:
						SCREAMING_SNAKE_CASE_   : Union[str, Any]					  =      ord(lowerCamelCase_  )
						SCREAMING_SNAKE_CASE_   : Tuple					  =      pow(2  ,							lowerCamelCase_  )

						# If we already turned on bit for current character's unicode
						if bitmap >> ch_unicode & 1 == 1:
									return False
						bitmap |= ch_bit_index_on
			return True


if __name__ == "__main__":
						import doctest

						doctest.testmod()



