
def  lowerCAmelCase__			(  SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_     )				->		Union[str, Any]:
			if index == r:
						for j in range(lowerCAmelCase_     ):
									print(data[j]       ,							end=' '     )
						print(' '     )
						return
			#  When no more elements are there to put in data[]
			if i >= n:
						return
			# current is included, put next at next location
			lowerCAmelCase__      :      int         =		arr[i]
			combination_util(lowerCAmelCase_       ,							lowerCAmelCase_       ,							lowerCAmelCase_       ,							index + 1       ,							lowerCAmelCase_       ,							i + 1     )
			# current is excluded, replace it with
			# next (Note that i+1 is passed, but
			# index is not changed)
			combination_util(lowerCAmelCase_       ,							lowerCAmelCase_       ,							lowerCAmelCase_       ,							lowerCAmelCase_       ,							lowerCAmelCase_       ,							i + 1     )
			# The main function that prints all combinations
			# of size r in arr[] of size n. This function
			# mainly uses combinationUtil()
def  lowerCAmelCase__			(  SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_     )				->		Optional[Any]:
			# A temporary array to store all combination one by one
			lowerCAmelCase__      :      List[str]         =		[0] * r
			# Print all combination using temporary array 'data[]'
			combination_util(lowerCAmelCase_       ,							lowerCAmelCase_       ,							lowerCAmelCase_       ,							0       ,							lowerCAmelCase_       ,							0     )


if __name__ == "__main__":
					# Driver code to check the function above
					lowerCamelCase__          =		[10, 20, 30, 40, 50]
					print_combination(arr, len(arr), 3)
					# This code is contributed by Ambuj sahu







import math

class 						lowerCAmelCase   :

					'''simple docstring'''

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


												"""simple docstring"""

												__lowercase					:							Any			=   n
												__lowercase					:							Optional[int]			=   [
												    [math.inf for j in range(0						,   __a							)] for i in range(0						,   __a							)
												]  # adjacency matrix for weight
												__lowercase					:							Dict			=   [
												    [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 					lowerCAmelCase (     self :		int						,   __a :		Optional[int]						,   __a :		Tuple						,   __a :		Dict							)	->     Dict:


												"""simple docstring"""

												__lowercase					:							Any			=   w



					def 					lowerCAmelCase (     self :		List[str]							)	->     Tuple:


												"""simple docstring"""

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



					def 					lowerCAmelCase (     self :		Any						,   __a :		Any						,   __a :		str							)	->     int:


												"""simple docstring"""

												return self.dp[u][v]


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