




"""simple docstring"""
import math

class __lowercase:




					'''simple docstring'''


					def __init__(     self    ,						__a=0  ):  # a graph with Node 0,1,...,N-1
								__lowerCamelCase       :						Any													=					n
								__lowerCamelCase       :						Tuple													=					[
								    [math.inf for j in range(0    ,						__a  )] for i in range(0    ,						__a  )
								]  # adjacency matrix for weight
								__lowerCamelCase       :						Union[str, Any]													=					[
								    [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      snake_case_					(     self    ,						__a    ,						__a    ,						__a  ):
								__lowerCamelCase       :						List[Any]													=					w
					def      snake_case_					(     self  ):






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





					def      snake_case_					(     self    ,						__a    ,						__a  ):
								return self.dp[u][v]


if __name__ == "__main__":
					a_					:     Optional[Any]					    =  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)





'''simple docstring'''




import random







def 						lowerCAmelCase_							(  snake_case__						,							snake_case__						,							snake_case__		):




    '''simple docstring'''



    A			:  Optional[Any]   =		a[left_index]
    A			:  List[str]   =		left_index + 1
    for j in range(left_index + 1						,							snake_case__		):
        if a[j] < pivot:
            A,    A			:  Optional[int]   =		a[i], a[j]
            i += 1
    A,    A			:  str   =		a[i - 1], a[left_index]
    return i - 1







def 						lowerCAmelCase_							(  snake_case__						,							snake_case__						,							snake_case__		):




    '''simple docstring'''



    if left < right:
        A			:  Optional[Any]   =		random.randint(snake_case__						,							right - 1		)
        A,    A			:  List[str]   =		(
            a[left],
            a[pivot],
        )  # switches the pivot with the left most bound
        A			:  Any   =		partition(snake_case__						,							snake_case__						,							snake_case__		)
        quick_sort_random(
            snake_case__						,							snake_case__						,							snake_case__		)  # recursive quicksort to the left of the pivot point
        quick_sort_random(
            snake_case__						,							pivot_index + 1						,							snake_case__		)  # recursive quicksort to the right of the pivot point







def 						lowerCAmelCase_							(  ):




    '''simple docstring'''



    A			:  Any   =		input('''Enter numbers separated by a comma:\n'''		).strip()
    A			:  List[str]   =		[int(snake_case__		) for item in user_input.split(''','''		)]

    quick_sort_random(snake_case__						,							0						,							len(snake_case__		)		)

    print(snake_case__		)


if __name__ == "__main__":
      main()




