






from ..utils import DummyObject, requires_backends






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Tuple							=							['''flax''']

		def __init__(					self		:    Dict    ,       *SCREAMING_SNAKE_CASE__		:    Optional[int]    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Tuple    ,       *SCREAMING_SNAKE_CASE__		:    int    ,       **SCREAMING_SNAKE_CASE__		:    List[str]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    str    ,       *SCREAMING_SNAKE_CASE__		:    int    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       List[str]							=							['''flax''']

		def __init__(					self		:    Optional[Any]    ,       *SCREAMING_SNAKE_CASE__		:    Dict    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Tuple    ,       *SCREAMING_SNAKE_CASE__		:    List[str]    ,       **SCREAMING_SNAKE_CASE__		:    Any    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    int    ,       *SCREAMING_SNAKE_CASE__		:    Tuple    ,       **SCREAMING_SNAKE_CASE__		:    List[str]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Any							=							['''flax''']

		def __init__(					self		:    Optional[int]    ,       *SCREAMING_SNAKE_CASE__		:    Any    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Optional[int]    ,       *SCREAMING_SNAKE_CASE__		:    List[str]    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    List[str]    ,       *SCREAMING_SNAKE_CASE__		:    Optional[int]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Dict							=							['''flax''']

		def __init__(					self		:    Union[str, Any]    ,       *SCREAMING_SNAKE_CASE__		:    Optional[Any]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[Any]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    List[Any]    ,       *SCREAMING_SNAKE_CASE__		:    Union[str, Any]    ,       **SCREAMING_SNAKE_CASE__		:    Tuple    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    str    ,       *SCREAMING_SNAKE_CASE__		:    Tuple    ,       **SCREAMING_SNAKE_CASE__		:    List[str]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       int							=							['''flax''']

		def __init__(					self		:    int    ,       *SCREAMING_SNAKE_CASE__		:    str    ,       **SCREAMING_SNAKE_CASE__		:    Any    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Union[str, Any]    ,       *SCREAMING_SNAKE_CASE__		:    str    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    Optional[int]    ,       *SCREAMING_SNAKE_CASE__		:    List[Any]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Union[str, Any]							=							['''flax''']

		def __init__(					self		:    str    ,       *SCREAMING_SNAKE_CASE__		:    Tuple    ,       **SCREAMING_SNAKE_CASE__		:    Any    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    List[str]    ,       *SCREAMING_SNAKE_CASE__		:    Union[str, Any]    ,       **SCREAMING_SNAKE_CASE__		:    Union[str, Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    List[str]    ,       *SCREAMING_SNAKE_CASE__		:    List[Any]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       List[Any]							=							['''flax''']

		def __init__(					self		:    Dict    ,       *SCREAMING_SNAKE_CASE__		:    List[str]    ,       **SCREAMING_SNAKE_CASE__		:    Tuple    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    List[str]    ,       *SCREAMING_SNAKE_CASE__		:    str    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    List[str]    ,       *SCREAMING_SNAKE_CASE__		:    List[str]    ,       **SCREAMING_SNAKE_CASE__		:    List[str]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       List[Any]							=							['''flax''']

		def __init__(					self		:    List[str]    ,       *SCREAMING_SNAKE_CASE__		:    List[str]    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Optional[int]    ,       *SCREAMING_SNAKE_CASE__		:    Tuple    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    Any    ,       *SCREAMING_SNAKE_CASE__		:    Optional[int]    ,       **SCREAMING_SNAKE_CASE__		:    Tuple    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Tuple							=							['''flax''']

		def __init__(					self		:    int    ,       *SCREAMING_SNAKE_CASE__		:    Tuple    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    List[Any]    ,       *SCREAMING_SNAKE_CASE__		:    Optional[Any]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    Tuple    ,       *SCREAMING_SNAKE_CASE__		:    str    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Optional[Any]							=							['''flax''']

		def __init__(					self		:    int    ,       *SCREAMING_SNAKE_CASE__		:    Optional[Any]    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Dict    ,       *SCREAMING_SNAKE_CASE__		:    Any    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    Optional[int]    ,       *SCREAMING_SNAKE_CASE__		:    Optional[Any]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Optional[int]							=							['''flax''']

		def __init__(					self		:    Union[str, Any]    ,       *SCREAMING_SNAKE_CASE__		:    Any    ,       **SCREAMING_SNAKE_CASE__		:    List[str]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Union[str, Any]    ,       *SCREAMING_SNAKE_CASE__		:    Optional[int]    ,       **SCREAMING_SNAKE_CASE__		:    str    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    Tuple    ,       *SCREAMING_SNAKE_CASE__		:    Union[str, Any]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Optional[Any]							=							['''flax''']

		def __init__(					self		:    Union[str, Any]    ,       *SCREAMING_SNAKE_CASE__		:    Tuple    ,       **SCREAMING_SNAKE_CASE__		:    Union[str, Any]    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Optional[Any]    ,       *SCREAMING_SNAKE_CASE__		:    Any    ,       **SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    str    ,       *SCREAMING_SNAKE_CASE__		:    List[str]    ,       **SCREAMING_SNAKE_CASE__		:    str    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )






class 			_UpperCamelCase(       metaclass=__lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       List[str]							=							['''flax''']

		def __init__(					self		:    Any    ,       *SCREAMING_SNAKE_CASE__		:    Any    ,       **SCREAMING_SNAKE_CASE__		:    int    ):



					'''simple docstring'''



					requires_backends(self    ,       ['flax']    )

		@classmethod
		def    __lowerCAmelCase  (					cls		:    Any    ,       *SCREAMING_SNAKE_CASE__		:    Any    ,       **SCREAMING_SNAKE_CASE__		:    Union[str, Any]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )



		@classmethod
		def    __lowerCAmelCase  (					cls		:    Dict    ,       *SCREAMING_SNAKE_CASE__		:    Optional[Any]    ,       **SCREAMING_SNAKE_CASE__		:    Optional[int]    ):



					'''simple docstring'''



					requires_backends(cls    ,       ['flax']    )











def lowerCamelCase__  (     _lowercase					,		_lowercase ):

     '''simple docstring'''


     while a != 0:
          UpperCAmelCase_,       UpperCAmelCase_     :				Optional[int]  =     b % a, a
     return b







def lowerCamelCase__  (     _lowercase					,		_lowercase ):

     '''simple docstring'''


     if gcd(_lowercase					,		_lowercase ) != 1:
          UpperCAmelCase_     :				int  =     f'''mod inverse of {a!r} and {m!r} does not exist'''
          raise ValueError(_lowercase )
     UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_     :				Union[str, Any]  =     1, 0, a
     UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_     :				Dict  =     0, 1, m
     while va != 0:
          UpperCAmelCase_     :				List[Any]  =     ua // va
          UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_,       UpperCAmelCase_     :				Any  =     (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
     return ua % m