





'''simple docstring'''


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


lowerCAmelCase_   :   Any       =					re.compile(R"^(?P<major>\d+)" R"\.(?P<minor>\d+)" R"\.(?P<patch>\d+)$")






@total_ordering
@dataclass
class       UpperCamelCase__  :
	lowerCAmelCase__					:			str
	lowerCAmelCase__					:			Optional[str]								=						None
	lowerCAmelCase__					:			Optional[Union[str, int]]								=						None
	lowerCAmelCase__					:			Optional[Union[str, int]]								=						None
	lowerCAmelCase__					:			Optional[Union[str, int]]								=						None







	def 						__a   (				self			:   Dict		):




				'''simple docstring'''
				a__   ,				a__   ,				a__     = _str_to_version_tuple(self.version_str		)







	def __repr__(				self			:   Any		):




				'''simple docstring'''
				return F'''{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}'''







	@property
	def 						__a   (				self			:   List[Any]		):




				'''simple docstring'''
				return self.major, self.minor, self.patch







	def 						__a   (				self			:   Dict , lowerCamelCase			:   Tuple		):




				'''simple docstring'''
				if isinstance(lowerCamelCase , lowerCamelCase		):
							return Version(lowerCamelCase		)
				elif isinstance(lowerCamelCase , lowerCamelCase		):
							return other
				raise TypeError(F'''{other} (type {type(lowerCamelCase		)}) cannot be compared to version.'''		)







	def __eq__(				self			:   Optional[Any] , lowerCamelCase			:   Union[str, Any]		):




				'''simple docstring'''
				try:
							a__     = self._validate_operand(lowerCamelCase		)
				except (TypeError, ValueError):
							return False
				else:
							return self.tuple == other.tuple







	def __lt__(				self			:   Any , lowerCamelCase			:   int		):




				'''simple docstring'''
				a__     = self._validate_operand(lowerCamelCase		)
				return self.tuple < other.tuple







	def __hash__(				self			:   Optional[int]		):




				'''simple docstring'''
				return hash(_version_tuple_to_str(self.tuple		)		)







	@classmethod
	def 						__a   (				cls			:   List[str] , lowerCamelCase			:   Tuple		):




				'''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 						__a   (				self			:   Any		):




				'''simple docstring'''
				return self.version_str







def    _lowerCamelCase  (__lowerCamelCase  :     Union[str, Any]     )   ->    int:
			a__     = _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    _lowerCamelCase  (__lowerCamelCase  :     Any     )   ->    Optional[int]:
			return ".".join(str(__lowerCamelCase     ) for v in version_tuple     )










'''simple docstring'''


def    _lowerCamelCase  (__lowerCamelCase  :     str     )   ->    bool:
			a__     = 0
			for ch in input_str:
						a__     = ord(__lowerCamelCase     )
						a__     = pow(2					,  __lowerCamelCase     )

						# If we already turned on bit for current character's unicode
						if bitmap >> ch_unicode & 1 == 1:
									return False
						bitmap |= ch_bit_index_on
			return True


if __name__ == "__main__":
		import doctest

		doctest.testmod()



