





from __future__ import annotations

from dataclasses import dataclass





@dataclass
class 						_A:


				"""simple docstring"""


				UpperCamelCase    :  float
				UpperCamelCase    :  TreeNode | None					    =	None
				UpperCamelCase    :  TreeNode | None					    =	None







def  _SCREAMING_SNAKE_CASE				(   a  )      ->      bool:

					# Validation
					def is_valid_tree(a  ) -> bool:
										if node is None:
															return True

										if not isinstance(a					,						a  ):
															return False

										try:
															float(node.data  )
										except (TypeError, ValueError):
															return False

										return is_valid_tree(node.left  ) and is_valid_tree(node.right  )

					if not is_valid_tree(a  ):
										raise ValueError(
										    'Each node should be type of TreeNode and data should be float.'  )

					def is_binary_search_tree_recursive_check(
					    a					,						a					,						a  ) -> bool:

										if node is None:
															return True

										return (
										    left_bound < node.data < right_bound
										    and is_binary_search_tree_recursive_check(node.left					,						a					,						node.data  )
										    and is_binary_search_tree_recursive_check(
										        node.right					,						node.data					,						a  )
										)

					return is_binary_search_tree_recursive_check(a					,						-float('inf'  )					,						float('inf'  )  )


if __name__ == "__main__":
				import doctest

				doctest.testmod()











def  _SCREAMING_SNAKE_CASE				(   a  )      ->      Tuple:
					__A    ,				__A	:						Optional[Any]       =				[], []
					while len(a  ) > 1:
										__A    ,				__A	:						Any       =				min(a  ), max(a  )
										start.append(a  )
										end.append(a  )
										collection.remove(a  )
										collection.remove(a  )
					end.reverse()
					return start + collection + end


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




