
"""simple docstring"""
def  lowercase     (_lowerCAmelCase						):
						__lowerCAmelCase     =  []
						if len(_lowerCAmelCase						) == 1:
												return [nums.copy()]
						for _ in range(len(_lowerCAmelCase						)						):
												__lowerCAmelCase     =  nums.pop(0						)
												__lowerCAmelCase     =  permute(_lowerCAmelCase						)
												for perm in permutations:
																		perm.append(_lowerCAmelCase						)
												result.extend(_lowerCAmelCase						)
												nums.append(_lowerCAmelCase						)
						return result

def  lowercase     (_lowerCAmelCase						):

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

						__lowerCAmelCase     =  []
						backtrack(0						)
						return output


if __name__ == "__main__":
			import doctest

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


"""simple docstring"""
from __future__ import annotations

def  lowercase     (_lowerCAmelCase						):
						__lowerCAmelCase     =  2
						__lowerCAmelCase     =  []
						while i * i <= n:
												if n % i:
																		i += 1
												else:
																		n //= i
																		factors.append(_lowerCAmelCase						)
						if n > 1:
												factors.append(_lowerCAmelCase						)
						return factors


if __name__ == "__main__":
			import doctest

			doctest.testmod()
