
class   UpperCAmelCase		:



   def __init__(self		:					int )		->	List[str]:


          '''simple docstring'''


          snake_case       :   Union[str, Any]							=      {}



   def 				_SCREAMING_SNAKE_CASE   (self		:					Optional[Any] )		->	Dict:


          '''simple docstring'''


          print(self.vertex )
          for i in self.vertex:
                 print(UpperCAmelCase__    ,						" -> "    ,						" -> ".join([str(UpperCAmelCase__ ) for j in self.vertex[i]] ) )



   def 				_SCREAMING_SNAKE_CASE   (self		:					Optional[Any]    ,						snake_case__		:					int    ,						snake_case__		:					int )		->	List[Any]:


          '''simple docstring'''


          if from_vertex in self.vertex:
                 self.vertex[from_vertex].append(UpperCAmelCase__ )
          else:
                 # else make a new vertex
                 snake_case       :   List[Any]							=      [to_vertex]



   def 				_SCREAMING_SNAKE_CASE   (self		:					Dict )		->	Optional[Any]:


          '''simple docstring'''


          snake_case       :   Union[str, Any]							=      [False] * len(self.vertex )

          # call the recursive helper function
          for i in range(len(self.vertex ) ):
                 if not visited[i]:
                        self.dfs_recursive(UpperCAmelCase__    ,						UpperCAmelCase__ )



   def 				_SCREAMING_SNAKE_CASE   (self		:					Union[str, Any]    ,						snake_case__		:					int    ,						snake_case__		:					list )		->	int:


          '''simple docstring'''


          snake_case       :   List[str]							=      True

          print(UpperCAmelCase__    ,						end=" " )

          # Recur for all the vertices that are adjacent to this node
          for i in self.vertex:
                 if not visited[i]:
                        self.dfs_recursive(UpperCAmelCase__    ,						UpperCAmelCase__ )


if __name__ == "__main__":
   __lowerCamelCase							=       Graph()
   g.add_edge(0, 1)
   g.add_edge(0, 2)
   g.add_edge(1, 2)
   g.add_edge(2, 0)
   g.add_edge(2, 3)
   g.add_edge(3, 3)

   g.print_graph()
   print("""DFS:""")
   g.dfs()

   # OUTPUT:
   # 0  ->  1 -> 2
   # 1  ->  2
   # 2  ->  0 -> 3
   # 3  ->  3
   # DFS:
   #  0 1 2 3








"""simple docstring"""





def   _A  (  UpperCamelCase_     :       Any)	->						List[str]:
   '''simple docstring'''


   __lowercase		,__lowercase								=						[], []
   while len(UpperCamelCase_) > 1:
      __lowercase		,__lowercase								=						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=',')




