




def        __UpperCAmelCase						(							lowerCamelCase_ :     int  )       ->  list[int]:







			"""simple docstring"""





			if length <= 0 or not isinstance(lowerCamelCase_  ,							lowerCamelCase_  ):
						raise ValueError('Length must be a positive integer.'  )
			return [n * (2 * n - 1) for n in range(lowerCamelCase_  )]


if __name__ == "__main__":
						print(hexagonal_numbers(length=5))
						print(hexagonal_numbers(length=10))







'''simple docstring'''







from __future__ import annotations

from collections.abc import Iterator
class 						UpperCamelCase__       :



     """simple docstring"""






     def __init__(			self   ,						snake_case__ ):

            '''simple docstring'''

            _lowerCAmelCase     :				List[Any]       =							value
            _lowerCAmelCase     :				Node | None       =							None
            _lowerCAmelCase     :				Node | None       =							None
class 						UpperCamelCase__       :



     """simple docstring"""






     def __init__(			self   ,						snake_case__ ):

            '''simple docstring'''

            _lowerCAmelCase     :				List[Any]       =							tree







     def a						(			self   ,						snake_case__ ):

            '''simple docstring'''

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







     def __iter__(			self ):

            '''simple docstring'''

            yield self.depth_first_search(self.tree )


if __name__ == "__main__":
       import doctest

       doctest.testmod()

