
"""simple docstring"""






import random
from typing import Any





def __A						(   a_ :							list     )->							list[Any]:




		'''simple docstring'''






		for _ in range(len(a_     )     ):
				SCREAMING_SNAKE_CASE       :     Tuple				= random.randint(0		,		len(a_     ) - 1     )
				SCREAMING_SNAKE_CASE       :     str				= random.randint(0		,		len(a_     ) - 1     )
				SCREAMING_SNAKE_CASE,					SCREAMING_SNAKE_CASE       :     Union[str, Any]				= data[b], data[a]
		return data


if __name__ == "__main__":
					lowerCamelCase__ :       Tuple						     =			[0, 1, 2, 3, 4, 5, 6, 7]
					lowerCamelCase__ :       List[Any]						     =			["python", "says", "hello", "!"]
					print("Fisher-Yates Shuffle:")
					print("List", integers, strings)
					print("FY Shuffle", fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))







"""simple docstring"""






import math




class 				lowercase__:
	'''simple docstring'''

	def __init__(						self    :Union[str, Any]		, lowerCamelCase_    :List[str]=0					)							->			List[Any]:  # a graph with Node 0,1,...,N-1







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= n
			SCREAMING_SNAKE_CASE       :     List[Any]				= [
			    [math.inf for j in range(0		, lowerCamelCase_					)] for i in range(0		, lowerCamelCase_					)
			]  # adjacency matrix for weight
			SCREAMING_SNAKE_CASE       :     Any				= [
			    [math.inf for j in range(0		, lowerCamelCase_					)] for i in range(0		, lowerCamelCase_					)
			]  # dp[i][j] stores minimum distance from i to j





	def   __lowerCAmelCase (						self    :Dict		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :Union[str, Any]					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[Any]				= w





	def   __lowerCAmelCase (						self    :str					)							->			Union[str, Any]:







			'''simple docstring'''




			for k in range(0		, self.n					):
					for i in range(0		, self.n					):
							for j in range(0		, self.n					):
									SCREAMING_SNAKE_CASE       :     List[str]				= min(self.dp[i][j]		, self.dp[i][k] + self.dp[k][j]					)







	def   __lowerCAmelCase (						self    :int		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :Optional[int]					)							->			Optional[Any]:







			'''simple docstring'''




			return self.dp[u][v]


if __name__ == "__main__":
					lowerCamelCase__ :       Dict						     =			Graph(5)
					graph.add_edge(0, 2, 9)
					graph.add_edge(0, 4, 10)
					graph.add_edge(1, 3, 5)
					graph.add_edge(2, 3, 7)
					graph.add_edge(3, 0, 10)
					graph.add_edge(3, 1, 2)
					graph.add_edge(3, 2, 1)
					graph.add_edge(3, 4, 6)
					graph.add_edge(4, 1, 3)
					graph.add_edge(4, 2, 4)
					graph.add_edge(4, 3, 9)
					graph.floyd_warshall()
					graph.show_min(1, 4)
					graph.show_min(0, 3)





