



'''simple docstring'''



from __future__ import annotations






class        UpperCAmelCase__						:



					def __init__(     self      ,					UpperCamelCase = 0  )  ->      None:
						__lowerCAmelCase       				=	value
						__lowerCAmelCase       				=	None
						__lowerCAmelCase       				=	None



def 	__lowerCAmelCase       (				lowerCamelCase :    Node | None					,		lowerCamelCase :    Node | None       ):






	'''simple docstring'''




	if treea is None:
		return treea
	if treea is None:
		return treea

	__lowerCAmelCase       				=	treea.value + treea.value
	__lowerCAmelCase       				=	merge_two_binary_trees(treea.left					,		treea.left       )
	__lowerCAmelCase       				=	merge_two_binary_trees(treea.right					,		treea.right       )
	return treea



def 	__lowerCAmelCase       (				lowerCamelCase :    Node | None       ):






	'''simple docstring'''




	if root:
		print(root.value       )
		print_preorder(root.left       )
		print_preorder(root.right       )


if __name__ == "__main__":
	lowerCAmelCase						:		Dict						      = Node(1)
	lowerCAmelCase						:		str						      = Node(2)
	lowerCAmelCase						:		str						      = Node(3)
	lowerCAmelCase						:		str						      = Node(4)

	lowerCAmelCase						:		Dict						      = Node(2)
	lowerCAmelCase						:		List[str]						      = Node(4)
	lowerCAmelCase						:		Optional[Any]						      = Node(6)
	lowerCAmelCase						:		Tuple						      = Node(9)
	lowerCAmelCase						:		int						      = Node(5)

	print('''Tree1 is: ''')
	print_preorder(treea)
	print('''Tree2 is: ''')
	print_preorder(treea)
	lowerCAmelCase						:		Any						      = merge_two_binary_trees(treea, treea)
	print('''Merged Tree is: ''')
	print_preorder(merged_tree)




'''simple docstring'''



from __future__ import annotations

from random import randrange



def 	__lowerCAmelCase       (				lowerCamelCase :    list       ):






	'''simple docstring'''




	if len(lowerCamelCase       ) < 2:
		return collection
	__lowerCAmelCase       				=	randrange(len(lowerCamelCase       )       )  # Use random element as pivot
	__lowerCAmelCase       				=	collection[pivot_index]
	__lowerCAmelCase       				=	[]  # All elements greater than pivot
	__lowerCAmelCase       				=	[]  # All elements less than or equal to pivot

	for element in collection[:pivot_index]:
		(greater if element > pivot else lesser).append(lowerCamelCase       )

	for element in collection[pivot_index + 1 :]:
		(greater if element > pivot else lesser).append(lowerCamelCase       )

	return [*quick_sort(lowerCamelCase       ), pivot, *quick_sort(lowerCamelCase       )]


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