




# Lint as: python3
import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


_lowerCamelCase	:		Tuple							       =   re.compile(r"""^(?P<major>\d+)""" r"""\.(?P<minor>\d+)""" r"""\.(?P<patch>\d+)$""")


@total_ordering
@dataclass
class 				UpperCamelCase_    :

    '''simple docstring'''






    UpperCAmelCase__							  =      42
    UpperCAmelCase__							  =      None
    UpperCAmelCase__							  =      None
    UpperCAmelCase__							  =      None
    UpperCAmelCase__							  =      None


    def        SCREAMING_SNAKE_CASE							(			self      :	Any)						->Any:





           '''simple docstring'''

           A__ ,							A__ ,							A__       =    _str_to_version_tuple(self.version_str)


    def __repr__(			self      :	Dict)						->List[str]:





           '''simple docstring'''

           return f"""{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}"""


    @property
    def        SCREAMING_SNAKE_CASE							(			self      :	Optional[int])						->List[str]:





           '''simple docstring'''

           return self.major, self.minor, self.patch


    def        SCREAMING_SNAKE_CASE							(			self      :	Optional[int]					, UpperCAmelCase__      :	Union[str, Any])						->List[Any]:





           '''simple docstring'''

           if isinstance(UpperCAmelCase__					, UpperCAmelCase__):
                  return Version(UpperCAmelCase__)
           elif isinstance(UpperCAmelCase__					, UpperCAmelCase__):
                  return other
           raise TypeError(f"""{other} (type {type(UpperCAmelCase__)}) cannot be compared to version.""")


    def __eq__(			self      :	Tuple					, UpperCAmelCase__      :	int)						->Union[str, Any]:





           '''simple docstring'''

           try:
                  A__       =    self._validate_operand(UpperCAmelCase__)
           except (TypeError, ValueError):
                  return False
           else:
                  return self.tuple == other.tuple


    def __lt__(			self      :	List[Any]					, UpperCAmelCase__      :	Union[str, Any])						->List[str]:





           '''simple docstring'''

           A__       =    self._validate_operand(UpperCAmelCase__)
           return self.tuple < other.tuple


    def __hash__(			self      :	int)						->Any:





           '''simple docstring'''

           return hash(_version_tuple_to_str(self.tuple))


    @classmethod
    def        SCREAMING_SNAKE_CASE							(			cls      :	Optional[int]					, UpperCAmelCase__      :	int)						->List[str]:





           '''simple docstring'''

           A__       =    {f.name for f in dataclasses.fields(cls)}
           return cls(**{k: v for k, v in dic.items() if k in field_names})





    def        SCREAMING_SNAKE_CASE							(			self      :	Dict)						->str:





           '''simple docstring'''

           return self.version_str







def SCREAMING_SNAKE_CASE				(       lowercase_						)   ->       Union[str, Any]:



       """simple docstring"""

       A__       =    _VERSION_REG.match(lowercase_						)
       if not res:
              raise ValueError(f"""Invalid version '{version_str}'. Format should be x.y.z with {{x,y,z}} being digits."""						)
       return tuple(int(lowercase_						) for v in [res.group('''major'''						), res.group('''minor'''						), res.group('''patch'''						)]						)







def SCREAMING_SNAKE_CASE				(       lowercase_						)   ->       Union[str, Any]:



       """simple docstring"""

       return ".".join(str(lowercase_						) for v in version_tuple						)









def 						__SCREAMING_SNAKE_CASE  (				UpperCamelCase__			,			UpperCamelCase__			,			UpperCamelCase__ )  ->				int:







			'''simple docstring'''

			if exponent == 1:
						return base
			if exponent % 2 == 0:
						UpperCAmelCase   		=				_modexpt(UpperCamelCase__			,			exponent // 2			,			UpperCamelCase__ ) % modulo_value
						return (x * x) % modulo_value
			else:
						return (base * _modexpt(UpperCamelCase__			,			exponent - 1			,			UpperCamelCase__ )) % modulo_value





def 						__SCREAMING_SNAKE_CASE  (				UpperCamelCase__ = 1777			,			UpperCamelCase__ = 1855			,			UpperCamelCase__ = 8 )  ->				int:







			'''simple docstring'''

			UpperCAmelCase   		=				base
			for _ in range(1			,			UpperCamelCase__ ):
						UpperCAmelCase   		=				_modexpt(UpperCamelCase__			,			UpperCamelCase__			,			10**digits )

			return result


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



