

def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     bool:
       A_		   = 0
       for ch in input_str:
              A_		   = ord(UpperCAmelCase__			)
              A_		   = pow(2,    UpperCAmelCase__			)

              # 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()



'''simple docstring'''







from functools import lru_cache
@lru_cache
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       if num < 0:
              raise ValueError("""Number should not be negative."""			)

       return 1 if num in (0, 1) else num * factorial(num - 1			)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
