def lowerCamelCase  (   SCREAMING_SNAKE_CASE	):
    '''simple docstring'''







    __UpperCamelCase  ,       __UpperCamelCase     :str			  =		[], []
    while len(SCREAMING_SNAKE_CASE__	) > 1:
        __UpperCamelCase  ,       __UpperCamelCase     :Union[str, Any]			  =		min(SCREAMING_SNAKE_CASE__	), max(SCREAMING_SNAKE_CASE__	)
        start.append(SCREAMING_SNAKE_CASE__	)
        end.append(SCREAMING_SNAKE_CASE__	)
        collection.remove(SCREAMING_SNAKE_CASE__	)
        collection.remove(SCREAMING_SNAKE_CASE__	)
    end.reverse()
    return start + collection + end


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









_A		       =						{0: [2, 3], 1: [0], 2: [1], 3: [4], 4: []}

_A		       =						{0: [1, 2, 3], 1: [2], 2: [0], 3: [4], 4: [5], 5: [3]}

def 						_UpperCAmelCase				(			SCREAMING_SNAKE_CASE__			:					dict[int, list[int]]			,     SCREAMING_SNAKE_CASE__			:					int			,     SCREAMING_SNAKE_CASE__			:					list[bool]				):
     __UpperCamelCase    							=True
     __UpperCamelCase    							=[]

     for neighbour in graph[vert]:
          if not visited[neighbour]:
               order += topology_sort(SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__				)

     order.append(SCREAMING_SNAKE_CASE__				)

     return order

def 						_UpperCAmelCase				(			SCREAMING_SNAKE_CASE__			:					dict[int, list[int]]			,     SCREAMING_SNAKE_CASE__			:					int			,     SCREAMING_SNAKE_CASE__			:					list[bool]				):
     __UpperCamelCase    							=True
     __UpperCamelCase    							=[vert]

     for neighbour in reversed_graph[vert]:
          if not visited[neighbour]:
               component += find_components(SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__				)

     return component





def 						_UpperCAmelCase				(			SCREAMING_SNAKE_CASE__			:					dict[int, list[int]]				):
     __UpperCamelCase    							=len(SCREAMING_SNAKE_CASE__				) * [False]
     __UpperCamelCase    							={vert: [] for vert in range(len(SCREAMING_SNAKE_CASE__				)				)}

     for vert, neighbours in graph.items():
          for neighbour in neighbours:
               reversed_graph[neighbour].append(SCREAMING_SNAKE_CASE__				)

     __UpperCamelCase    							=[]
     for i, was_visited in enumerate(SCREAMING_SNAKE_CASE__				):
          if not was_visited:
               order += topology_sort(SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__				)

     __UpperCamelCase    							=[]
     __UpperCamelCase    							=len(SCREAMING_SNAKE_CASE__				) * [False]

     for i in range(len(SCREAMING_SNAKE_CASE__				)				):
          __UpperCamelCase    							=order[len(SCREAMING_SNAKE_CASE__				) - i - 1]
          if not visited[vert]:
               __UpperCamelCase    							=find_components(SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__				)
               components_list.append(SCREAMING_SNAKE_CASE__				)

     return components_list





