



'''simple docstring'''





from math import sqrt




def lowerCAmelCase    (__A = 1_000_000):



     """simple docstring"""



     _a           =    0
     _a           =    0
     _a           =    42

     while num_cuboids <= limit:
          max_cuboid_size += 1
          for sum_shortest_sides in range(2    ,      2 * max_cuboid_size + 1):
               if sqrt(sum_shortest_sides**2 + max_cuboid_size**2).is_integer():
                    num_cuboids += (
                        min(__A    ,      sum_shortest_sides // 2)
                        - max(1    ,      sum_shortest_sides - max_cuboid_size)
                        + 1
                    )

     return max_cuboid_size


if __name__ == "__main__":
  print(F"""{solution() = }""")





'''simple docstring'''
from __future__ import annotations

import queue






class 	snake_case__       :







		"""simple docstring"""

		def __init__(      self				:			int  ,	UpperCamelCase__				:			Optional[int]      )						->			Dict:






				"""simple docstring"""







				snake_case  :       Union[str, Any]     			=						data
				snake_case  :       Tuple     			=						None
				snake_case  :       int     			=						None







def    _UpperCamelCase						(       )  ->							TreeNode:


		'''simple docstring'''


		print('''\n********Press N to stop entering at any point of time********\n'''			)
		snake_case  :       List[Any]     			=						input('''Enter the value of the root node: '''			).strip().lower()
		snake_case  :       queue.Queue     			=						queue.Queue()
		snake_case  :       List[Any]     			=						TreeNode(int(SCREAMING_SNAKE_CASE__			)			)
		q.put(SCREAMING_SNAKE_CASE__			)
		while not q.empty():
				snake_case  :       List[str]     			=						q.get()
				snake_case  :       List[str]     			=						F'Enter the left node of {node_found.data}: '
				snake_case  :       List[Any]     			=						input(SCREAMING_SNAKE_CASE__			).strip().lower() or '''n'''
				if check == "n":
						return tree_node
				snake_case  :       Any     			=						TreeNode(int(SCREAMING_SNAKE_CASE__			)			)
				snake_case  :       List[str]     			=						left_node
				q.put(SCREAMING_SNAKE_CASE__			)
				snake_case  :       Union[str, Any]     			=						F'Enter the right node of {node_found.data}: '
				snake_case  :       Optional[Any]     			=						input(SCREAMING_SNAKE_CASE__			).strip().lower() or '''n'''
				if check == "n":
						return tree_node
				snake_case  :       Any     			=						TreeNode(int(SCREAMING_SNAKE_CASE__			)			)
				snake_case  :       Union[str, Any]     			=						right_node
				q.put(SCREAMING_SNAKE_CASE__			)
		raise




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		print(node.data ,       end=''','''			)
		pre_order(node.left			)
		pre_order(node.right			)




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		in_order(node.left			)
		print(node.data ,       end=''','''			)
		in_order(node.right			)




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		post_order(node.left			)
		post_order(node.right			)
		print(node.data ,       end=''','''			)




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		snake_case  :       queue.Queue     			=						queue.Queue()
		q.put(SCREAMING_SNAKE_CASE__			)
		while not q.empty():
				snake_case  :       Any     			=						q.get()
				print(node_dequeued.data ,       end=''','''			)
				if node_dequeued.left:
						q.put(node_dequeued.left			)
				if node_dequeued.right:
						q.put(node_dequeued.right			)




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		snake_case  :       queue.Queue     			=						queue.Queue()
		q.put(SCREAMING_SNAKE_CASE__			)
		while not q.empty():
				snake_case  :       str     			=						[]
				while not q.empty():
						snake_case  :       int     			=						q.get()
						print(node_dequeued.data ,       end=''','''			)
						if node_dequeued.left:
								list_.append(node_dequeued.left			)
						if node_dequeued.right:
								list_.append(node_dequeued.right			)
				print()
				for node in list_:
						q.put(SCREAMING_SNAKE_CASE__			)




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		snake_case  :       list[TreeNode]     			=						[]
		snake_case  :       Union[str, Any]     			=						node
		while n or stack:
				while n:  # start from root node, find its left child
						print(n.data ,       end=''','''			)
						stack.append(SCREAMING_SNAKE_CASE__			)
						snake_case  :       Dict     			=						n.left
				# end of while means current node doesn't have left child
				snake_case  :       List[Any]     			=						stack.pop()
				# start to traverse its right child
				snake_case  :       Any     			=						n.right




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		snake_case  :       list[TreeNode]     			=						[]
		snake_case  :       Dict     			=						node
		while n or stack:
				while n:
						stack.append(SCREAMING_SNAKE_CASE__			)
						snake_case  :       List[str]     			=						n.left
				snake_case  :       Union[str, Any]     			=						stack.pop()
				print(n.data ,       end=''','''			)
				snake_case  :       int     			=						n.right




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__			)  ->							None:


		'''simple docstring'''


		if not isinstance(SCREAMING_SNAKE_CASE__ ,       SCREAMING_SNAKE_CASE__			) or not node:
				return
		snake_case			,snake_case  :       Dict     			=						[], []
		snake_case  :       Optional[int]     			=						node
		stacka.append(SCREAMING_SNAKE_CASE__			)
		while stacka:  # to find the reversed order of post order, store it in stack2
				snake_case  :       Union[str, Any]     			=						stacka.pop()
				if n.left:
						stacka.append(n.left			)
				if n.right:
						stacka.append(n.right			)
				stacka.append(SCREAMING_SNAKE_CASE__			)
		while stacka:  # pop up from stack2 will be the post order
				print(stacka.pop().data ,       end=''','''			)




def    _UpperCamelCase						(       SCREAMING_SNAKE_CASE__ = "" ,       SCREAMING_SNAKE_CASE__=50 ,       SCREAMING_SNAKE_CASE__="*"			)  ->							str:


		'''simple docstring'''


		if not s:
				return "\n" + width * char
		snake_case			,snake_case  :       Any     			=						divmod(width - len(SCREAMING_SNAKE_CASE__			) - 2 ,       2			)
		return F'{left * char} {s} {(left + extra) * char}'


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						print(prompt("Binary Tree Traversals"))

						lowercase__						       =      build_tree()
						print(prompt("Pre Order Traversal"))
						pre_order(node)
						print(prompt() + "\n")

						print(prompt("In Order Traversal"))
						in_order(node)
						print(prompt() + "\n")

						print(prompt("Post Order Traversal"))
						post_order(node)
						print(prompt() + "\n")

						print(prompt("Level Order Traversal"))
						level_order(node)
						print(prompt() + "\n")

						print(prompt("Actual Level Order Traversal"))
						level_order_actual(node)
						print("*" * 5_0 + "\n")

						print(prompt("Pre Order Traversal - Iteration Version"))
						pre_order_iter(node)
						print(prompt() + "\n")

						print(prompt("In Order Traversal - Iteration Version"))
						in_order_iter(node)
						print(prompt() + "\n")

						print(prompt("Post Order Traversal - Iteration Version"))
						post_order_iter(node)
						print(prompt())


