






'''simple docstring'''




import hashlib
from typing import Union

def       __lowercase		(    __lowercase ) ->		bytes:

      '''simple docstring'''


      if isinstance(__lowercase     ,						__lowercase ):
            # Data already in bytes, returns as it as
            return hash_data
      elif isinstance(__lowercase     ,						__lowercase ):
            # We keep the data as it as for it ot be later encoded to UTF-8
            # However replace `\\` with `/` for Windows compatibility
            _A      =			hash_data.replace("\\"     ,						"/" )
      elif isinstance(__lowercase     ,						__lowercase ):
            _A      =			str(__lowercase )
      else:
            # If data is not of the required type, raise error
            raise InvalidKeyError(__lowercase )

      return hash_data.encode("utf-8" )

class      _UpperCAmelCase    (  snake_case_		):




   """simple docstring"""

   def __init__(	self				:			Any   ,   __UpperCAmelCase				:			Any	):





         '''simple docstring'''





         _A      =			"\nFAILURE TO GENERATE DATASET: Invalid key type detected"
         _A      =			f'''\nFound Key {hash_data} of type {type(__UpperCAmelCase	)}'''
         _A      =			"\nKeys should be either str, int or bytes type"
         super().__init__(f'''{self.prefix}{self.err_msg}{self.suffix}'''	)





class      _UpperCAmelCase    (  snake_case_		):




   """simple docstring"""

   def __init__(	self				:			Any   ,   __UpperCAmelCase				:			Union[str, Any]   ,   __UpperCAmelCase				:			Tuple   ,   __UpperCAmelCase				:			Union[str, Any]=""	):





         '''simple docstring'''





         _A      =			key
         _A      =			duplicate_key_indices
         _A      =			fix_msg
         _A      =			"Found multiple examples generated with the same key"
         if len(__UpperCAmelCase	) <= 20:
               _A      =			f'''\nThe examples at index {', '.join(__UpperCAmelCase	)} have the key {key}'''
         else:
               _A      =			f'''\nThe examples at index {', '.join(duplicate_key_indices[:20]	)}... ({len(__UpperCAmelCase	) - 20} more) have the key {key}'''
         _A      =			"\n" + fix_msg if fix_msg else ""
         super().__init__(f'''{self.prefix}{self.err_msg}{self.suffix}'''	)





class      _UpperCAmelCase    :




   """simple docstring"""

   def __init__(	self				:			List[str]   ,   __UpperCAmelCase				:			str	):





         '''simple docstring'''





         _A      =			hashlib.mda(_as_bytes(__UpperCAmelCase	)	)

   def 		lowerCAmelCase				(	self				:			Optional[Any]   ,   __UpperCAmelCase				:			Union[str, int, bytes]	):





         '''simple docstring'''





         _A      =			self._split_mda.copy()
         _A      =			_as_bytes(__UpperCAmelCase	)
         mda.update(__UpperCAmelCase	)
         # Convert to integer with hexadecimal conversion
         return int(mda.hexdigest()   ,   16	)













'''simple docstring'''




import math

def       __lowercase		(    __lowercase ) ->		bool:

      '''simple docstring'''


      if 1 < number < 4:
            # 2 and 3 are primes
            return True
      elif number < 2 or number % 2 == 0 or number % 3 == 0:
            # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
            return False

      # All primes number are in format of 6k +/- 1
      for i in range(5     ,						int(math.sqrt(__lowercase ) + 1 )     ,						6 ):
            if number % i == 0 or number % (i + 2) == 0:
                  return False
      return True

def       __lowercase		(    __lowercase = 6008_5147_5143 ) ->		int:

      '''simple docstring'''


      try:
            _A      =			int(__lowercase )
      except (TypeError, ValueError):
            raise TypeError("Parameter n must be int or castable to int." )
      if n <= 0:
            raise ValueError("Parameter n must be greater than or equal to one." )
      _A      =			0
      if is_prime(__lowercase ):
            return n
      while n % 2 == 0:
            n //= 2
      if is_prime(__lowercase ):
            return n
      for i in range(3     ,						int(math.sqrt(__lowercase ) ) + 1     ,						2 ):
            if n % i == 0:
                  if is_prime(n // i ):
                        _A      =			n // i
                        break
                  elif is_prime(__lowercase ):
                        _A      =			i
      return max_number


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





