



def 	UpperCAmelCase__      (      UpperCAmelCase__ :bytes					):






 '''simple docstring'''

 return "".join([hex(UpperCAmelCase__					)[2:].zfill(2					).upper() for byte in list(UpperCAmelCase__					)]					)


def 	UpperCAmelCase__      (      UpperCAmelCase__ :str					):






 '''simple docstring'''

 if (len(UpperCAmelCase__					) % 2) != 0:
  raise ValueError(
      "Base16 encoded data is invalid:\nData does not have an even number of hex digits."					)
 # Check the character set - the standard base16 alphabet
 # is uppercase according to RFC3548 section 6
 if not set(UpperCAmelCase__					) <= set("0123456789ABCDEF"					):
  raise ValueError(
      "Base16 encoded data is invalid:\nData is not uppercase hex or it contains invalid characters."					)
 # For every two hexadecimal digits (= a byte), turn it into an integer.
 # Then, string the result together into bytes, and return it.
 return bytes(int(data[i] + data[i + 1] ,					16					) for i in range(0 ,					len(UpperCAmelCase__					) ,					2					)					)


if __name__ == "__main__":
     import doctest

     doctest.testmod()






from __future__ import annotations


def 	UpperCAmelCase__      (      UpperCAmelCase__ :int					):






 '''simple docstring'''

 a						=		str(UpperCAmelCase__					)
 return len(UpperCAmelCase__					) == 9 and set(UpperCAmelCase__					) == set("123456789"					)


def 	UpperCAmelCase__      (      ):






 '''simple docstring'''

 for base_num in range(99_99 ,					49_99 ,					-1					):
  a						=		10_00_02 * base_num
  if is_9_pandigital(UpperCAmelCase__					):
   return candidate

 for base_num in range(3_33 ,					99 ,					-1					):
  a						=		1_00_20_03 * base_num
  if is_9_pandigital(UpperCAmelCase__					):
   return candidate

 return None


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

