




from __future__ import annotations




class       __lowerCAmelCase				:






       def __init__(      self:    Union[str, Any]				,    _lowerCAmelCase:    str				,    _lowerCAmelCase:    str ):
         lowercase		,			lowercase			:str							=  text, pattern
         lowercase		,			lowercase			:Tuple							=  len(_lowerCAmelCase ), len(_lowerCAmelCase )






       def     SCREAMING_SNAKE_CASE			(      self:    List[str]				,    _lowerCAmelCase:    str ):

         for i in range(self.patLen - 1				,    -1				,    -1 ):
           if char == self.pattern[i]:
             return i
         return -1






       def     SCREAMING_SNAKE_CASE			(      self:    Dict				,    _lowerCAmelCase:    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     SCREAMING_SNAKE_CASE			(      self:    Tuple ):
         # searches pattern in text and returns index positions
         lowercase			:Tuple							=  []
         for i in range(self.textLen - self.patLen + 1 ):
           lowercase			:List[str]							=  self.mismatch_in_text(_lowerCAmelCase )
           if mismatch_index == -1:
             positions.append(_lowerCAmelCase )
           else:
             lowercase			:Optional[int]							=  self.match_in_pattern(self.text[mismatch_index] )
             lowercase			:Optional[int]							=  (
                 mismatch_index - match_index
             )  # shifting index lgtm [py/multiple-definition]
         return positions







_UpperCAmelCase		:  Dict	=   "ABAABA"
_UpperCAmelCase		:  Union[str, Any]	=   "AB"
_UpperCAmelCase		:  str	=   BoyerMooreSearch(text, pattern)
_UpperCAmelCase		:  Tuple	=   bms.bad_character_heuristic()

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




def    a__       (						__UpperCamelCase = 1_0_0_0 ):
      SCREAMING_SNAKE_CASE_      =     -1
      SCREAMING_SNAKE_CASE_      =     0
      for a in range(1   ,					n // 3 ):
            # Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c
            SCREAMING_SNAKE_CASE_      =     (n * n - 2 * a * n) // (2 * n - 2 * a)
            SCREAMING_SNAKE_CASE_      =     n - a - b
            if c * c == (a * a + b * b):
                  SCREAMING_SNAKE_CASE_      =     a * b * c
                  if candidate >= product:
                        SCREAMING_SNAKE_CASE_      =     candidate
      return product


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


