






"""simple docstring"""


from __future__ import annotations




class 						__UpperCamelCase     :
					def __init__(							self							:	Any     , UpperCAmelCase							:	str     , UpperCAmelCase							:	str   )	->       List[Any]:
											lowerCAmelCase	, lowerCAmelCase   :Optional[Any]						=			text, pattern
											lowerCAmelCase	, lowerCAmelCase   :Union[str, Any]						=			len(UpperCAmelCase   ), len(UpperCAmelCase   )
					def        UpperCAmelCase__ (							self							:	str     , UpperCAmelCase							:	str   )	->       int:

											for i in range(self.patLen - 1     , -1     , -1   ):
																	if char == self.pattern[i]:
																							return i
											return -1
					def        UpperCAmelCase__ (							self							:	Optional[int]     , UpperCAmelCase							:	int   )	->       int:

											for i in range(self.patLen - 1     , -1     , -1   ):
																	if self.pattern[i] != self.text[current_pos + i]:
																							return current_pos + i
											return -1
					def        UpperCAmelCase__ (							self							:	int   )	->       list[int]:
											# searches pattern in text and returns index positions
											lowerCAmelCase   :str						=			[]
											for i in range(self.textLen - self.patLen + 1   ):
																	lowerCAmelCase   :str						=			self.mismatch_in_text(UpperCAmelCase   )
																	if mismatch_index == -1:
																							positions.append(UpperCAmelCase   )
																	else:
																							lowerCAmelCase   :Tuple						=			self.match_in_pattern(self.text[mismatch_index]   )
																							lowerCAmelCase   :Dict						=			(
																							    mismatch_index - match_index
																							)  # shifting index lgtm [py/multiple-definition]
											return positions


__SCREAMING_SNAKE_CASE   =   'ABAABA'
__SCREAMING_SNAKE_CASE   =   'AB'
__SCREAMING_SNAKE_CASE   =   BoyerMooreSearch(text, pattern)
__SCREAMING_SNAKE_CASE   =   bms.bad_character_heuristic()

if len(positions) == 0:
		print('No match found')
else:
		print('Pattern found in following positions: ')
		print(positions)







"""simple docstring"""


from math import sqrt


def        UpperCAmelCase      (					a__ = 1_00_00_00 ):





						'''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(a__     ,      sum_shortest_sides // 2 )
																								    - max(1     ,      sum_shortest_sides - max_cuboid_size )
																								    + 1
																								)

						return max_cuboid_size


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