





'''simple docstring'''

from __future__ import annotations

from collections.abc import Iterator


class 					a_     :

    '''simple docstring'''


    def __init__(		self ,		A       )		->   Optional[Any]:
        _SCREAMING_SNAKE_CASE									=			value
        _SCREAMING_SNAKE_CASE									=			None
        _SCREAMING_SNAKE_CASE									=			None




class 					a_     :

    '''simple docstring'''


    def __init__(		self ,		A       )		->   Optional[Any]:
        _SCREAMING_SNAKE_CASE									=			tree


    def 			snake_case_(		self ,		A       )		->   List[str]:






        if node is None:
            return 0
        return node.value + (
            self.depth_first_search(node.left       ) + self.depth_first_search(node.right       )
        )





    def __iter__(		self       )		->   Optional[Any]:
        yield self.depth_first_search(self.tree       )


if __name__ == "__main__":
      import doctest

      doctest.testmod()




def       _snake_case	(   lowerCAmelCase							:   list	):
		"""simple docstring"""







		SCREAMING_SNAKE_CASE_  :		Dict				      =    len(lowerCAmelCase	)
		for i in range(1   , lowerCAmelCase	):
				SCREAMING_SNAKE_CASE_  :		int				      =    collection[i]
				SCREAMING_SNAKE_CASE_  :		Any				      =    0
				SCREAMING_SNAKE_CASE_  :		Tuple				      =    i - 1

				while low <= high:
						SCREAMING_SNAKE_CASE_  :		int				      =    (low + high) // 2
						if val < collection[mid]:
								SCREAMING_SNAKE_CASE_  :		Optional[Any]				      =    mid - 1
						else:
								SCREAMING_SNAKE_CASE_  :		Tuple				      =    mid + 1
				for j in range(lowerCAmelCase   , lowerCAmelCase   , -1	):
						SCREAMING_SNAKE_CASE_  :		Union[str, Any]				      =    collection[j - 1]
				SCREAMING_SNAKE_CASE_  :		int				      =    val
		return collection


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