


'''simple docstring'''







class 				__lowerCamelCase				:
    """simple docstring"""


    def __init__(						self    :							Tuple   ,							SCREAMING_SNAKE_CASE    :							List[str]):
           _A  :			Union[str, Any]											=      data
           _A  :			BinaryTreeNode | None											=      None
           _A  :			BinaryTreeNode | None											=      None






def    lowerCAmelCase__ (       lowerCamelCase  :    BinaryTreeNode | None						,lowerCamelCase  :    int     ):
       if node is None:
              _A  :			List[Any]											=      BinaryTreeNode(UpperCamelCase__     )
              return node

       # binary search tree is not empty,
       # so we will insert it into the tree
       # if new_value is less than value of data in node,
       #  add it to left subtree and proceed recursively
       if new_value < node.data:
              _A  :			Dict											=      insert(node.left_child						,UpperCamelCase__     )
       else:
              # if new_value is greater than value of data in node,
              #  add it to right subtree and proceed recursively
              _A  :			int											=      insert(node.right_child						,UpperCamelCase__     )
       return node






def    lowerCAmelCase__ (       lowerCamelCase  :    None | BinaryTreeNode     ):  # if node is None,return
       if node:
              _A  :			Dict											=      inorder(node.left_child     )
              _A  :			str											=      [*inorder_array, node.data]
              _A  :			List[Any]											=      inorder_array + inorder(node.right_child     )
       else:
              _A  :			Union[str, Any]											=      []
       return inorder_array






def    lowerCAmelCase__ (       ):
       _A  :			List[Any]											=      insert(UpperCamelCase__						,15     )
       insert(UpperCamelCase__						,10     )
       insert(UpperCamelCase__						,25     )
       insert(UpperCamelCase__						,6     )
       insert(UpperCamelCase__						,14     )
       insert(UpperCamelCase__						,20     )
       insert(UpperCamelCase__						,60     )
       return root






def    lowerCAmelCase__ (       ):
       # main function
       _A  :			Dict											=      make_tree()
       print('Printing values of binary search tree in Inorder Traversal.'     )
       inorder(UpperCamelCase__     )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()










'''simple docstring'''







A   :  Optional[Any]       		=				{
    '''0000''': '''0''',
    '''0001''': '''1''',
    '''0010''': '''2''',
    '''0011''': '''3''',
    '''0100''': '''4''',
    '''0101''': '''5''',
    '''0110''': '''6''',
    '''0111''': '''7''',
    '''1000''': '''8''',
    '''1001''': '''9''',
    '''1010''': '''a''',
    '''1011''': '''b''',
    '''1100''': '''c''',
    '''1101''': '''d''',
    '''1110''': '''e''',
    '''1111''': '''f''',
}






def    lowerCAmelCase__ (       lowerCamelCase  :    str     ):
       _A  :			Union[str, Any]											=      str(lowerCamelCase     ).strip()

       # Exceptions
       if not binary_str:
              raise ValueError('Empty string was passed to the function'     )
       _A  :			Any											=      binary_str[0] == '-'
       _A  :			str											=      binary_str[1:] if is_negative else binary_str
       if not all(char in '01' for char in binary_str     ):
              raise ValueError('Non-binary value was passed to the function'     )

       _A  :			Optional[Any]											=      (
           '0' * (4 * (divmod(len(lowerCamelCase     )						,4     )[0] + 1) - len(lowerCamelCase     )) + binary_str
       )

       _A  :			Optional[int]											=      []
       for x in range(0						,len(lowerCamelCase     )						,4     ):
              hexadecimal.append(BITS_TO_HEX[binary_str[x : x + 4]]     )
       _A  :			int											=      '0x' + ''.join(lowerCamelCase     )

       return "-" + hexadecimal_str if is_negative else hexadecimal_str


if __name__ == "__main__":
   from doctest import testmod

   testmod()






