



import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


__UpperCAmelCase	       =	re.compile(r'''^(?P<major>\d+)''' r'''\.(?P<minor>\d+)''' r'''\.(?P<patch>\d+)$''')



@total_ordering
@dataclass
class     lowerCAmelCase_		:
       UpperCAmelCase__    : str
       UpperCAmelCase__    : Optional[str]       					=  None
       UpperCAmelCase__    : Optional[Union[str, int]]       					=  None
       UpperCAmelCase__    : Optional[Union[str, int]]       					=  None
       UpperCAmelCase__    : Optional[Union[str, int]]       					=  None
       def  snake_case_	(      self	)					->		Optional[int]:
          UpperCamelCase   :  int						     =     _str_to_version_tuple(self.version_str	)
       def __repr__(      self	)					->		str:
          return F"""{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}"""
       @property
       def  snake_case_	(      self	)					->		Dict:
          return self.major, self.minor, self.patch
       def  snake_case_	(      self,      SCREAMING_SNAKE_CASE_	)					->		Union[str, Any]:
          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,      SCREAMING_SNAKE_CASE_	)					->		List[str]:
          try:
             UpperCamelCase   :  Tuple						     =     self._validate_operand(_UpperCAmelCase	)
          except (TypeError, ValueError):
             return False
          else:
             return self.tuple == other.tuple
       def __lt__(      self,      SCREAMING_SNAKE_CASE_	)					->		Dict:
          UpperCamelCase   :  Tuple						     =     self._validate_operand(_UpperCAmelCase	)
          return self.tuple < other.tuple
       def __hash__(      self	)					->		int:
          return hash(_version_tuple_to_str(self.tuple	)	)
       @classmethod
       def  snake_case_	(      cls,      SCREAMING_SNAKE_CASE_	)					->		int:
          UpperCamelCase   :  Optional[int]						     =     {f.name for f in dataclasses.fields(cls	)}
          return cls(**{k: v for k, v in dic.items() if k in field_names}	)






       def  snake_case_	(      self	)					->		List[str]:
          return self.version_str






def 		UpperCamelCase     (       snake_case__	:   int     )     ->					Dict:
   UpperCamelCase   :  List[str]						     =     _VERSION_REG.match(lowerCAmelCase_     )
   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(lowerCAmelCase_     ) for v in [res.group('major'     ), res.group('minor'     ), res.group('patch'     )]     )


def 		UpperCamelCase     (       snake_case__	:   Any     )     ->					Tuple:
   return ".".join(str(lowerCAmelCase_     ) for v in version_tuple     )









from abc import ABC, abstractmethod
from argparse import ArgumentParser



class     lowerCAmelCase_		(  a__							):
       @staticmethod
       @abstractmethod
       def  snake_case_	(      SCREAMING_SNAKE_CASE_	)					->		int:
          raise NotImplementedError()






       @abstractmethod
       def  snake_case_	(      self	)					->		str:
          raise NotImplementedError()



