
def      lowerCamelCase__       (       __lowerCAmelCase						:						Tuple					,							__lowerCAmelCase						:						Tuple       ):




	"""simple docstring"""


	print("\nThe shortest path matrix using Floyd Warshall algorithm\n"       )
	for i in range(_lowerCamelCase       ):
		for j in range(_lowerCamelCase       ):
			if dist[i][j] != float("inf"       ):
				print(int(dist[i][j]       )					,							end="\t"       )
			else:
				print("INF"					,							end="\t"       )
		print()






def      lowerCamelCase__       (       __lowerCAmelCase						:						List[str]					,							__lowerCAmelCase						:						Union[str, Any]       ):




	"""simple docstring"""


	lowerCAmelCase_      			=			[[float("inf"       ) for _ in range(_lowerCamelCase       )] for _ in range(_lowerCamelCase       )]

	for i in range(_lowerCamelCase       ):
		for j in range(_lowerCamelCase       ):
			lowerCAmelCase_      			=			graph[i][j]

			# check vertex k against all other vertices (i, j)
	for k in range(_lowerCamelCase       ):
		# looping through rows of graph array
		for i in range(_lowerCamelCase       ):
			# looping through columns of graph array
			for j in range(_lowerCamelCase       ):
				if (
				    dist[i][k] != float("inf"       )
				    and dist[k][j] != float("inf"       )
				    and dist[i][k] + dist[k][j] < dist[i][j]
				):
					lowerCAmelCase_      			=			dist[i][k] + dist[k][j]

	_print_dist(_lowerCamelCase					,							_lowerCamelCase       )
	return dist, v


if __name__ == "__main__":
			_A     =  int(input("Enter number of vertices: "))
			_A     =  int(input("Enter number of edges: "))

			_A     =  [[float("inf") for i in range(v)] for j in range(v)]

			for i in range(v):
						_A     =  0.0

						# src and dst are indices that must be within the array size graph[e][v]
						# failure to follow this will result in an error
			for i in range(e):
						print("\nEdge ", i + 1)
						_A     =  int(input("Enter source:"))
						_A     =  int(input("Enter destination:"))
						_A     =  float(input("Enter weight:"))
						_A     =  weight

			floyd_warshall(graph, v)

			# Example Input
			# Enter number of vertices: 3
			# Enter number of edges: 2

			# # generated graph from vertex and edge inputs
			# [[inf, inf, inf], [inf, inf, inf], [inf, inf, inf]]
			# [[0.0, inf, inf], [inf, 0.0, inf], [inf, inf, 0.0]]

			# specify source, destination and weight for edge #1
			# Edge  1
			# Enter source:1
			# Enter destination:2
			# Enter weight:2

			# specify source, destination and weight for edge #2
			# Edge  2
			# Enter source:2
			# Enter destination:1
			# Enter weight:1

			# # Expected Output from the vertice, edge and src, dst, weight inputs!!
			# 0		INF	INF
			# INF	0	2
			# INF	1	0





import functools






def      lowerCamelCase__       (       __lowerCAmelCase						:						str					,							__lowerCAmelCase						:						str       ):




			"""simple docstring"""


			lowerCAmelCase_      			=			len(__lowerCAmelCase       )
			lowerCAmelCase_      			=			len(__lowerCAmelCase       )

			@functools.cache
			def min_distance(__lowerCAmelCase						:						int					,							__lowerCAmelCase						:						int       ) -> int:
						# if first word index is overflow - delete all from the second word
						if indexa >= len_worda:
									return len_worda - indexa
						# if second word index is overflow - delete all from the first word
						if indexa >= len_worda:
									return len_worda - indexa
						lowerCAmelCase_      			=			int(worda[indexa] != worda[indexa]       )  # current letters not identical
						return min(
						    1 + min_distance(indexa + 1					,							__lowerCAmelCase       )					,							1 + min_distance(__lowerCAmelCase					,							indexa + 1       )					,							diff + min_distance(indexa + 1					,							indexa + 1       )					,							)

			return min_distance(0					,							0       )


if __name__ == "__main__":
			import doctest

			doctest.testmod()



