


import math
class SCREAMING_SNAKE_CASE_  :






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







							"""simple docstring"""


							snake_case_						:     int     =		n
							snake_case_						:     Any     =		[
							    [math.inf for j in range(0						,				_A		)] for i in range(0						,				_A		)
							]  # adjacency matrix for weight
							snake_case_						:     Optional[int]     =		[
							    [math.inf for j in range(0						,				_A		)] for i in range(0						,				_A		)
							]  # dp[i][j] stores minimum distance from i to j






						def UpperCAmelCase_			( self : Optional[Any]						,				_A : List[str]						,				_A : Dict						,				_A : List[str]		)							->      List[str]:







							"""simple docstring"""


							snake_case_						:     List[Any]     =		w






						def UpperCAmelCase_			( self : Any		)							->      Tuple:







							"""simple docstring"""


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






						def UpperCAmelCase_			( self : Any						,				_A : Tuple						,				_A : int		)							->      str:







							"""simple docstring"""


							return self.dp[u][v]


if __name__ == "__main__":
						_SCREAMING_SNAKE_CASE 		=						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)








def 							SCREAMING_SNAKE_CASE__  (      __a				,	__a = False				):

	if not isinstance(__a				,	__a				):
		snake_case_						:     str     =		f"""Expected string as input, found {type(__a				)}"""
		raise ValueError(__a				)
	if not isinstance(__a				,	__a				):
		snake_case_						:     int     =		f"""Expected boolean as use_pascal parameter, found {type(__a				)}"""
		raise ValueError(__a				)

	snake_case_						:     Union[str, Any]     =		input_str.split('_'				)

	snake_case_						:     int     =		0 if use_pascal else 1

	snake_case_						:     List[Any]     =		words[start_index:]

	snake_case_						:     str     =		[word[0].upper() + word[1:] for word in words_to_capitalize]

	snake_case_						:     Optional[Any]     =		'' if use_pascal else words[0]

	return "".join([initial_word, *capitalized_words]				)


if __name__ == "__main__":
						from doctest import testmod

						testmod()

