



"""simple docstring"""






from math import sqrt






def 					snake_case__       (		__lowerCamelCase    :   int = 1000000     ):
			"""simple docstring"""
			lowerCamelCase__		:		int		     =0
			lowerCamelCase__		:		int		     =0
			lowerCamelCase__		:		int

			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(__lowerCamelCase							,		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






def 					snake_case__       (		__lowerCamelCase    :   str							,		__lowerCamelCase    :   list[str] | None = None     ):
			"""simple docstring"""
			lowerCamelCase__		:		List[Any]		     =word_bank or []
			# create a table
			lowerCamelCase__		:		int		     =len(__lowerCamelCase     ) + 1

			lowerCamelCase__		:		list[list[list[str]]]		     =[]
			for _ in range(__lowerCamelCase     ):
						table.append([]     )
			# seed value
			lowerCamelCase__		:		Tuple		     =[[]]  # because empty string has empty combination

			# iterate through the indices
			for i in range(__lowerCamelCase     ):
						# condition
						if table[i] != []:
									for word in word_bank:
												# slice condition
												if target[i : i + len(__lowerCamelCase     )] == word:
															lowerCamelCase__		:		list[list[str]]		     =[
															    [word, *way] for way in table[i]
															]
															# adds the word to every combination the current position holds
															# now,push that combination to the table[i+len(word)]
															table[i + len(__lowerCamelCase     )] += new_combinations

    # combinations are in reverse order so reverse for better output
			for combination in table[len(__lowerCamelCase     )]:
						combination.reverse()

			return table[len(__lowerCamelCase     )]


if __name__ == "__main__":
		print(all_construct("jwajalapa", ["jwa", "j", "w", "a", "la", "lapa"]))
		print(all_construct("rajamati", ["s", "raj", "amat", "raja", "ma", "i", "t"]))
		print(
		    all_construct(
		        "hexagonosaurus",
		        ["h", "ex", "hex", "ag", "ago", "ru", "auru", "rus", "go", "no", "o", "s"],
		    )
		)




