from __future__ import annotations

from random import randrange




def   _UpperCamelCase   (			snake_case__							)						->   list:
							if len(snake_case__							) < 2:
														return collection
							__UpperCAmelCase						:			Optional[Any]         =   randrange(len(snake_case__							)							)  # Use random element as pivot
							__UpperCAmelCase						:			Optional[Any]         =   collection[pivot_index]
							__UpperCAmelCase						:			list[int]         =   []  # All elements greater than pivot
							__UpperCAmelCase						:			list[int]         =   []  # All elements less than or equal to pivot

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

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

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


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





from __future__ import annotations




class 					_snake_case						:
					def __init__(  self:				List[Any]	,  __lowerCamelCase:				int = 0     )    ->				None:
												__UpperCAmelCase						:			Dict         =   value
												__UpperCAmelCase						:			Node | None         =   None
												__UpperCAmelCase						:			Node | None         =   None




def   _UpperCamelCase   (			snake_case__,    snake_case__							)						->   Node | None:
							if treea is None:
														return treea
							if treea is None:
														return treea

							__UpperCAmelCase						:			Tuple         =   treea.value + treea.value
							__UpperCAmelCase						:			Optional[Any]         =   merge_two_binary_trees(treea.left,    treea.left							)
							__UpperCAmelCase						:			List[str]         =   merge_two_binary_trees(treea.right,    treea.right							)
							return treea




def   _UpperCamelCase   (			snake_case__							)						->   None:
							if root:
														print(root.value							)
														print_preorder(root.left							)
														print_preorder(root.right							)


if __name__ == "__main__":
	_snake_case			=						Node(1)
	_snake_case			=						Node(2)
	_snake_case			=						Node(3)
	_snake_case			=						Node(4)

	_snake_case			=						Node(2)
	_snake_case			=						Node(4)
	_snake_case			=						Node(6)
	_snake_case			=						Node(9)
	_snake_case			=						Node(5)

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




