"""simple docstring"""
def    lowerCAmelCase__    (			_UpperCamelCase       :				list[int] ,			_UpperCamelCase       :				list[int] ,			_UpperCamelCase       :				int					)					->				bool:





						"""simple docstring"""






						return not any(
						    neighbour == 1 and colored_vertices[i] == color
						    for i, neighbour in enumerate(_UpperCamelCase					)					)





def    lowerCAmelCase__    (			_UpperCamelCase       :				list[list[int]] ,			_UpperCamelCase       :				int ,			_UpperCamelCase       :				list[int] ,			_UpperCamelCase       :				int					)					->				bool:





						"""simple docstring"""






						if index == len(_UpperCamelCase					):
												return True

						# Recursive Step
						for i in range(_UpperCamelCase					):
												if valid_coloring(graph[index] ,			_UpperCamelCase ,			_UpperCamelCase					):
																		# Color current vertex
																		snake_case								=			i
																		# Validate coloring
																		if util_color(_UpperCamelCase ,			_UpperCamelCase ,			_UpperCamelCase ,			index + 1					):
																								return True
																		# Backtrack
																		snake_case								=			-1
						return False





def    lowerCAmelCase__    (			_UpperCamelCase       :				list[list[int]] ,			_UpperCamelCase       :				int					)					->				list[int]:





						"""simple docstring"""






						snake_case								=			[-1] * len(_UpperCamelCase					)

						if util_color(_UpperCamelCase ,			_UpperCamelCase ,			_UpperCamelCase ,			0					):
												return colored_vertices

						return []



"""simple docstring"""
def    lowerCAmelCase__    (			_UpperCamelCase       :				int ,			_UpperCamelCase       :				int					)					->				int:





						"""simple docstring"""






						return int((input_a, input_a).count(0					) == 0					)





def    lowerCAmelCase__    (			)					->				None:





						"""simple docstring"""






						assert and_gate(0 ,			0					) == 0
						assert and_gate(0 ,			1					) == 0
						assert and_gate(1 ,			0					) == 0
						assert and_gate(1 ,			1					) == 1


if __name__ == "__main__":
					test_and_gate()
					print(and_gate(1, 0))
					print(and_gate(0, 0))
					print(and_gate(0, 1))
					print(and_gate(1, 1))


