





"""simple docstring"""
from __future__ import annotations

def 		_SCREAMING_SNAKE_CASE			(_UpperCAmelCase					:    list  ,     _UpperCAmelCase					:    int  ,     _UpperCAmelCase					:    int  ,     _UpperCAmelCase					:    int			):
 lowerCAmelCase    				= []
 lowerCAmelCase				,lowerCAmelCase    				= input_list[low:mid], input_list[mid : high + 1]
 while left and right:
  result.append((left if left[0] <= right[0] else right).pop(0			)			)
 lowerCAmelCase    				= result + left + right
 return input_list

def 		_SCREAMING_SNAKE_CASE			(_UpperCAmelCase					:    list			):
 if len(_UpperCAmelCase			) <= 1:
  return input_list
 lowerCAmelCase    				= list(_UpperCAmelCase			)

 # iteration for two-way merging
 lowerCAmelCase    				= 2
 while p <= len(_UpperCAmelCase			):
  # getting low, high and middle value for merge-sort of single list
  for i in range(0  ,     len(_UpperCAmelCase			)  ,     _UpperCAmelCase			):
   lowerCAmelCase    				= i
   lowerCAmelCase    				= i + p - 1
   lowerCAmelCase    				= (low + high + 1) // 2
   lowerCAmelCase    				= merge(_UpperCAmelCase  ,     _UpperCAmelCase  ,     _UpperCAmelCase  ,     _UpperCAmelCase			)
  # final merge of last two parts
  if p * 2 >= len(_UpperCAmelCase			):
   lowerCAmelCase    				= i
   lowerCAmelCase    				= merge(_UpperCAmelCase  ,     0  ,     _UpperCAmelCase  ,     len(_UpperCAmelCase			) - 1			)
   break
  p *= 2

 return input_list


if __name__ == "__main__":
       __UpperCamelCase     :						Union[str, Any]						       =  input('''Enter numbers separated by a comma:\n''').strip()
       if user_input == "":
              __UpperCamelCase     :						Tuple						       =  []
       else:
              __UpperCamelCase     :						List[Any]						       =  [int(item.strip()) for item in user_input.split(''',''')]
       print(iter_merge_sort(unsorted))









'''simple docstring'''
def       _lowercase							(					UpperCamelCase__							:       dict      ):
 __A	:		Dict	  =      set()
 # edges = list of graph's edges
 __A	:		Any	  =      get_edges(UpperCamelCase__      )

 # While there are still elements in edges list, take an arbitrary edge
 # (from_node, to_node) and add his extremity to chosen_vertices and then
 # remove all arcs adjacent to the from_node and to_node
 while edges:
  __A  ,__A	:		List[Any]	  =      edges.pop()
  chosen_vertices.add(UpperCamelCase__      )
  chosen_vertices.add(UpperCamelCase__      )
  for edge in edges.copy():
   if from_node in edge or to_node in edge:
    edges.discard(UpperCamelCase__      )
 return chosen_vertices


def       _lowercase							(					UpperCamelCase__							:       dict      ):
 __A	:		Any	  =      set()
 for from_node, to_nodes in graph.items():
  for to_node in to_nodes:
   edges.add((from_node, to_node)      )
 return edges


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 # graph = {0: [1, 3], 1: [0, 3], 2: [0, 3, 4], 3: [0, 1, 2], 4: [2, 3]}
 # print(f"Matching vertex cover:\n{matching_min_vertex_cover(graph)}")






