'''simple docstring'''




def 							snake_case__				(     _A:   str ,  _A:   str					)       ->      str:

		'''simple docstring'''


		if not (isinstance(_A ,  _A					) and isinstance(_A ,  _A					)):
				raise ValueError("""longest_common_substring() takes two strings for inputs"""					)

		lowerCAmelCase     =    len(_A					)
		lowerCAmelCase     =    len(_A					)

		lowerCAmelCase     =    [[0] * (texta_length + 1) for _ in range(texta_length + 1					)]
		lowerCAmelCase     =    0
		lowerCAmelCase     =    0

		for i in range(1 ,  texta_length + 1					):
				for j in range(1 ,  texta_length + 1					):
						if texta[i - 1] == texta[j - 1]:
								lowerCAmelCase     =    1 + dp[i - 1][j - 1]
								if dp[i][j] > ans_length:
										lowerCAmelCase     =    i
										lowerCAmelCase     =    dp[i][j]

		return texta[ans_index - ans_length : ans_index]


if __name__ == "__main__":
						import doctest

						doctest.testmod()





'''simple docstring'''




# 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 							snake_case__				(     _A:   Dict					)       ->      str:

		'''simple docstring'''


		lowerCAmelCase     =    [False] * len(_A					)
		lowerCAmelCase     =    [-1] * len(_A					)

		def dfs(_A:   Dict ,  _A:   Tuple					):
				lowerCAmelCase     =    True
				lowerCAmelCase     =    c
				for u in graph[v]:
						if not visited[u]:
								dfs(_A ,  1 - c					)

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

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

		return True


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




print(check_bipartite_dfs(graph))




