






'''simple docstring'''







class _lowercase	:




							def __init__(							self:				Union[str, Any]			,							UpperCamelCase__:				Dict     ):
														lowerCamelCase__					:	Union[str, Any]         =       val
														lowerCamelCase__					:	List[str]         =       None
														lowerCamelCase__					:	List[Any]         =       None




							def 		lowerCamelCase_				(							self:				Union[str, Any]			,							UpperCamelCase__:				Union[str, Any]     ):
														if self.val:
																					if val < self.val:
																												if self.left is None:
																																			lowerCamelCase__					:	List[str]         =       Node(UpperCamelCase__     )
																												else:
																																			self.left.insert(UpperCamelCase__     )
																					elif val > self.val:
																												if self.right is None:
																																			lowerCamelCase__					:	Dict         =       Node(UpperCamelCase__     )
																												else:
																																			self.right.insert(UpperCamelCase__     )
														else:
																					lowerCamelCase__					:	List[str]         =       val





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase      )      ->       Any:
							# Recursive traversal
							if root:
														inorder(root.left				,			UpperCamelCase      )
														res.append(root.val      )
														inorder(root.right				,			UpperCamelCase      )





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase      )      ->       int:
							# Build BST
							if len(UpperCamelCase      ) == 0:
														return arr
							lowerCamelCase__					:	str         =       Node(arr[0]      )
							for i in range(1				,			len(UpperCamelCase      )      ):
														root.insert(arr[i]      )
							# Traverse BST in order.
							lowerCamelCase__					:	Union[str, Any]         =       []
							inorder(UpperCamelCase				,			UpperCamelCase      )
							return res


if __name__ == "__main__":
			print(tree_sort([10, 1, 3, 2, 9, 14, 13]))









'''simple docstring'''







def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase      )      ->       int:
							return abs(UpperCamelCase      ) if a == 0 else greatest_common_divisor(b % a				,			UpperCamelCase      )





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase      )      ->       int:
							while y:  # --> when y=0 then loop will terminate and return x as final GCD.
														lowerCamelCase__  ,		lowerCamelCase__					:	Tuple         =       y, x % y
							return abs(UpperCamelCase      )





def  SCREAMING_SNAKE_CASE_       ()      ->       Tuple:
							try:
														lowerCamelCase__					:	Dict         =       input("""Enter two integers separated by comma (,): """      ).split(""","""      )
														lowerCamelCase__					:	Any         =       int(nums[0]      )
														lowerCamelCase__					:	Optional[Any]         =       int(nums[1]      )
														print(
														    f'''greatest_common_divisor({num_a}, {num_a}) = '''
														    f'''{greatest_common_divisor(UpperCamelCase				,			UpperCamelCase      )}'''      )
														print(f'''By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(UpperCamelCase				,			UpperCamelCase      )}'''      )
							except (IndexError, UnboundLocalError, ValueError):
														print("""Wrong input"""      )


if __name__ == "__main__":
			main()

