
import operator as op


__lowerCamelCase							=       """scaler.pt"""
__lowerCamelCase							=       """pytorch_model"""
__lowerCamelCase							=       """random_states"""
__lowerCamelCase							=       """optimizer"""
__lowerCamelCase							=       """scheduler"""
__lowerCamelCase							=       """pytorch_model.bin"""
__lowerCamelCase							=       """pytorch_model.bin.index.json"""
__lowerCamelCase							=       """model.safetensors"""
__lowerCamelCase							=       """model.safetensors.index.json"""
__lowerCamelCase							=       """1.10.2"""
__lowerCamelCase							=       """py38"""
__lowerCamelCase							=       """4.17.0"""
__lowerCamelCase							=       ["""ml.p3.16xlarge""", """ml.p3dn.24xlarge""", """ml.p4dn.24xlarge"""]
__lowerCamelCase							=       ["""FULL_SHARD""", """SHARD_GRAD_OP""", """NO_SHARD""", """HYBRID_SHARD""", """HYBRID_SHARD_ZERO2"""]
__lowerCamelCase							=       ["""TRANSFORMER_BASED_WRAP""", """SIZE_BASED_WRAP""", """NO_WRAP"""]
__lowerCamelCase							=       ["""BACKWARD_PRE""", """BACKWARD_POST""", """NO_PREFETCH"""]
__lowerCamelCase							=       ["""FULL_STATE_DICT""", """LOCAL_STATE_DICT""", """SHARDED_STATE_DICT"""]
__lowerCamelCase							=       """2.0.1"""
__lowerCamelCase							=       ["""pdsh""", """standard""", """openmpi""", """mvapich"""]
__lowerCamelCase							=       ["""default""", """reduce-overhead""", """max-autotune"""]

__lowerCamelCase							=       {""">""": op.gt, """>=""": op.ge, """==""": op.eq, """!=""": op.ne, """<=""": op.le, """<""": op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
__lowerCamelCase							=       [
    """nnodes""",
    """nproc_per_node""",
    """rdzv_backend""",
    """rdzv_endpoint""",
    """rdzv_id""",
    """rdzv_conf""",
    """standalone""",
    """max_restarts""",
    """monitor_interval""",
    """start_method""",
    """role""",
    """module""",
    """m""",
    """no_python""",
    """run_path""",
    """log_dir""",
    """r""",
    """redirects""",
    """t""",
    """tee""",
    """node_rank""",
    """master_addr""",
    """master_port""",
]

__lowerCamelCase							=       ["""DEEPSPEED""", """MULTI_GPU""", """FSDP""", """MEGATRON_LM"""]
__lowerCamelCase							=       ["""DEEPSPEED""", """MULTI_XPU""", """FSDP"""]







import math


def 						UpperCAmelCase			(	a_		,   a_ = 0		,   a_ = 0						)		->	list:







				"""simple docstring"""



				__A   			= end or len(a_						)
				for i in range(a_		,   a_						):
								__A   			= i
								__A   			= array[i]
								while temp_index != start and temp_index_value < array[temp_index - 1]:
												__A   			= array[temp_index - 1]
												temp_index -= 1
								__A   			= temp_index_value
				return array


def 						UpperCAmelCase			(	a_		,   a_		,   a_						)		->	None:  # Max Heap







				"""simple docstring"""



				__A   			= index
				__A   			= 2 * index + 1  # Left Node
				__A   			= 2 * index + 2  # Right Node

				if left_index < heap_size and array[largest] < array[left_index]:
								__A   			= left_index

				if right_index < heap_size and array[largest] < array[right_index]:
								__A   			= right_index

				if largest != index:
								__A			,							__A   			= array[largest], array[index]
								heapify(a_		,   a_		,   a_						)


def 						UpperCAmelCase			(	a_						)		->	list:







				"""simple docstring"""



				__A   			= len(a_						)

				for i in range(n // 2		,   -1		,   -1						):
								heapify(a_		,   a_		,   a_						)

				for i in range(n - 1		,   0		,   -1						):
								__A			,							__A   			= array[0], array[i]
								heapify(a_		,   0		,   a_						)

				return array


def 						UpperCAmelCase			(	a_		,   a_		,   a_		,   a_						)		->	int:







				"""simple docstring"""



				if (array[first_index] > array[middle_index]) != (
				    array[first_index] > array[last_index]
				):
								return array[first_index]
				elif (array[middle_index] > array[first_index]) != (
				    array[middle_index] > array[last_index]
				):
								return array[middle_index]
				else:
								return array[last_index]


def 						UpperCAmelCase			(	a_		,   a_		,   a_		,   a_						)		->	int:







				"""simple docstring"""



				__A   			= low
				__A   			= high
				while True:
								while array[i] < pivot:
												i += 1
								j -= 1
								while pivot < array[j]:
												j -= 1
								if i >= j:
												return i
								__A			,							__A   			= array[j], array[i]
								i += 1


def 						UpperCAmelCase			(	a_						)		->	list:







				"""simple docstring"""



				if len(a_						) == 0:
								return array
				__A   			= 2 * math.ceil(math.loga(len(a_						)						)						)
				__A   			= 1_6
				return intro_sort(a_		,   0		,   len(a_						)		,   a_		,   a_						)


def 						UpperCAmelCase			(	a_		,   a_		,   a_		,   a_		,   a_						)		->	list:







				"""simple docstring"""



				while end - start > size_threshold:
								if max_depth == 0:
												return heap_sort(a_						)
								max_depth -= 1
								__A   			= median_of_a(a_		,   a_		,   start + ((end - start) // 2) + 1		,   end - 1						)
								__A   			= partition(a_		,   a_		,   a_		,   a_						)
								intro_sort(a_		,   a_		,   a_		,   a_		,   a_						)
								__A   			= p
				return insertion_sort(a_		,   a_		,   a_						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					SCREAMING_SNAKE_CASE							:List[Any]							 =				input('Enter numbers separated by a comma : ').strip()
					SCREAMING_SNAKE_CASE							:str							 =				[float(item) for item in user_input.split(',')]
					print(sort(unsorted))
