

def 					__lowerCamelCase	( UpperCamelCase__      ):







							'''simple docstring'''






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





def 					__lowerCamelCase	( UpperCamelCase__      ):







							'''simple docstring'''






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

							snake_case_							=    []
							backtrack(0      )
							return output


if __name__ == "__main__":
					import doctest

					# use res to print the data in permute2 function
					_UpperCAmelCase		:   Union[str, Any]										=       permutea([1, 2, 3])
					print(res)
					doctest.testmod()







from PIL import Image





def 					__lowerCamelCase	( UpperCamelCase__   ,							UpperCamelCase__      ):







							'''simple docstring'''






							snake_case_							=    (259 * (level + 255)) / (255 * (259 - level))

							def contrast(UpperCamelCase__      ) -> int:
														return int(128 + factor * (c - 128)      )

							return img.point(UpperCamelCase__      )


if __name__ == "__main__":
					# Load image
					with Image.open("""image_data/lena.jpg""") as img:
										# Change contrast to 170
										_UpperCAmelCase		:   Tuple										=       change_contrast(img, 170)
										cont_img.save("""image_data/lena_high_contrast.png""", format="""png""")




