






'''simple docstring'''






def        _SCREAMING_SNAKE_CASE  (				A  :       Optional[int]  )    -> Union[str, Any]:







   """simple docstring"""
   __snake_case							,__snake_case				:      Any     							= [], []
   while len(__UpperCamelCase  ) > 1:
      __snake_case							,__snake_case				:      Optional[Any]     							= min(__UpperCamelCase  ), max(__UpperCamelCase  )
      start.append(__UpperCamelCase  )
      end.append(__UpperCamelCase  )
      collection.remove(__UpperCamelCase  )
      collection.remove(__UpperCamelCase  )
   end.reverse()
   return start + collection + end


if __name__ == "__main__":
      __A    	=   input('''Enter numbers separated by a comma:\n''').strip()
      __A    	=   [int(item) for item in user_input.split(''',''')]
      print(*merge_sort(unsorted), sep=''',''')







'''simple docstring'''






import math




class a_    :







   def __init__(self					,   __a=0)			->      Any:  # a graph with Node 0,1,...,N-1
      """simple docstring"""






      __snake_case				:      List[str]     							= n
      __snake_case				:      Tuple     							= [
          [math.inf for j in range(0					,   __a)] for i in range(0					,   __a)
      ]  # adjacency matrix for weight
      __snake_case				:      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     SCREAMING_SNAKE_CASE__					(self					,   __a					,   __a					,   __a)			->      Tuple:
      """simple docstring"""






      __snake_case				:      Union[str, Any]     							= w







   def     SCREAMING_SNAKE_CASE__					(self)			->      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				:      List[Any]     							= min(self.dp[i][j]					,   self.dp[i][k] + self.dp[k][j])







   def     SCREAMING_SNAKE_CASE__					(self					,   __a					,   __a)			->      Optional[int]:
      """simple docstring"""






      return self.dp[u][v]


if __name__ == "__main__":
      __A    	=   Graph(5)
      graph.add_edge(0, 2, 9)
      graph.add_edge(0, 4, 1_0)
      graph.add_edge(1, 3, 5)
      graph.add_edge(2, 3, 7)
      graph.add_edge(3, 0, 1_0)
      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)