





def 			SCREAMING_SNAKE_CASE (			_UpperCAmelCase					)     ->	str:
    return "".join([hex(_UpperCAmelCase					)[2:].zfill(2					).upper() for byte in list(_UpperCAmelCase					)]					)


def 			SCREAMING_SNAKE_CASE (			_UpperCAmelCase					)     ->	bytes:
    # Check data validity, following RFC3548
    # https://www.ietf.org/rfc/rfc3548.txt
    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()












def 			SCREAMING_SNAKE_CASE (			_UpperCAmelCase		,      _UpperCAmelCase					)     ->	Union[str, Any]:
    lowerCamelCase__       : List[Any]   					=						[1]
    for i in range(2		,      _UpperCAmelCase					):
        factorials.append(factorials[-1] * i					)
    assert 0 <= k < factorials[-1] * n, "k out of bounds"

    lowerCamelCase__       : str   					=						[]
    lowerCamelCase__       : Optional[Any]   					=						list(range(_UpperCAmelCase					)					)

    # Find permutation
    while factorials:
        lowerCamelCase__       : List[str]   					=						factorials.pop()
        lowerCamelCase__					,				lowerCamelCase__       : Tuple   					=						divmod(_UpperCAmelCase		,      _UpperCAmelCase					)
        permutation.append(elements[number]					)
        elements.remove(elements[number]					)
    permutation.append(elements[0]					)

    return permutation


if __name__ == "__main__":
    import doctest

    doctest.testmod()





