





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE				)							-> list[list[int]]:




    """simple docstring"""




    _A     =							[]
    if len(_SCREAMING_SNAKE_CASE				) == 1:
        return [nums.copy()]
    for _ in range(len(_SCREAMING_SNAKE_CASE				)				):
        _A     =							nums.pop(0				)
        _A     =							permute(_SCREAMING_SNAKE_CASE				)
        for perm in permutations:
            perm.append(_SCREAMING_SNAKE_CASE				)
        result.extend(_SCREAMING_SNAKE_CASE				)
        nums.append(_SCREAMING_SNAKE_CASE				)
    return result





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE				)							-> Optional[Any]:




    """simple docstring"""




    def backtrack(_SCREAMING_SNAKE_CASE				):
        if start == len(_SCREAMING_SNAKE_CASE				) - 1:
            output.append(nums[:]				)
        else:
            for i in range(_SCREAMING_SNAKE_CASE							,     len(_SCREAMING_SNAKE_CASE				)				):
                _A,			_A     =							nums[i], nums[start]
                backtrack(start + 1				)
                _A,			_A     =							nums[i], nums[start]  # backtrack

    _A     =							[]
    backtrack(0				)
    return output


if __name__ == "__main__":
 import doctest

 # use res to print the data in permute2 function
 __A							:			Optional[int]         =			permutea([1, 2, 3])
 print(res)
 doctest.testmod()










"""simple docstring"""







def       _lowerCamelCase				(							UpperCAmelCase_ :       bytes     )	-> str:






	"""simple docstring"""





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

def       _lowerCamelCase				(							UpperCAmelCase_ :       str     )	-> bytes:






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




