



import secrets
from random import shuffle
from string import ascii_letters, ascii_lowercase, ascii_uppercase, digits, punctuation







def  lowerCAmelCase_	(lowerCAmelCase__:		int = 8  ):





			"""simple docstring"""


			UpperCAmelCase_:		Optional[Any]							      =     ascii_letters + digits + punctuation
			return "".join(secrets.choice(lowerCAmelCase__  ) for _ in range(lowerCAmelCase__  )  )







def  lowerCAmelCase_	(lowerCAmelCase__:		str		,						lowerCAmelCase__:		int  ):





			"""simple docstring"""


			i -= len(lowerCAmelCase__  )
			UpperCAmelCase_:		Union[str, Any]							      =     i // 3
			UpperCAmelCase_:		str							      =     i % 3
			# chars = chars_incl + random_letters(ascii_letters, i / 3 + remainder) +
			#     random_number(digits, i / 3) + random_characters(punctuation, i / 3)
			UpperCAmelCase_:		Optional[Any]							      =     (
			    chars_incl
			    + random(lowerCAmelCase__		,						quotient + remainder  )
			    + random(lowerCAmelCase__		,						lowerCAmelCase__  )
			    + random(lowerCAmelCase__		,						lowerCAmelCase__  )
			)
			UpperCAmelCase_:		List[Any]							      =     list(lowerCAmelCase__  )
			shuffle(lowerCAmelCase__  )
			return "".join(lowerCAmelCase__  )

			# random is a generalised function for letters, characters and numbers







def  lowerCAmelCase_	(lowerCAmelCase__:		str		,						lowerCAmelCase__:		int  ):





			"""simple docstring"""


			return "".join(secrets.choice(lowerCAmelCase__  ) for _ in range(lowerCAmelCase__  )  )







def  lowerCAmelCase_	(lowerCAmelCase__:		Union[str, Any]		,						lowerCAmelCase__:		List[Any]  ):





			"""simple docstring"""


			pass  # Put your code here...







def  lowerCAmelCase_	(lowerCAmelCase__:		Tuple		,						lowerCAmelCase__:		Dict  ):





			"""simple docstring"""


			pass  # Put your code here...







def  lowerCAmelCase_	(lowerCAmelCase__:		List[Any]		,						lowerCAmelCase__:		Optional[int]  ):





			"""simple docstring"""


			pass  # Put your code here...







def  lowerCAmelCase_	(lowerCAmelCase__:		str		,						lowerCAmelCase__:		int = 8  ):





			"""simple docstring"""


			if len(lowerCAmelCase__  ) < min_length:
						# Your Password must be at least 8 characters long
						return False

			UpperCAmelCase_:		Tuple							      =     any(char in ascii_uppercase for char in password  )
			UpperCAmelCase_:		Union[str, Any]							      =     any(char in ascii_lowercase for char in password  )
			UpperCAmelCase_:		List[Any]							      =     any(char in digits for char in password  )
			UpperCAmelCase_:		List[Any]							      =     any(char in punctuation for char in password  )

			return upper and lower and num and spec_char
			# Passwords should contain UPPERCASE, lowerase
			# numbers, and special characters







def  lowerCAmelCase_	():





			"""simple docstring"""


			UpperCAmelCase_:		Optional[Any]							      =     int(input("""Please indicate the max length of your password: """  ).strip()  )
			UpperCAmelCase_:		Union[str, Any]							      =     input(
			    """Please indicate the characters that must be in your password: """  ).strip()
			print("""Password generated:"""		,						password_generator(lowerCAmelCase__  )  )
			print(
			    """Alternative Password generated:"""		,						alternative_password_generator(lowerCAmelCase__		,						lowerCAmelCase__  )		,						)
			print("""[If you are thinking of using this passsword, You better save it.]"""  )


if __name__ == "__main__":
	main()











def  lowerCAmelCase_	(lowerCAmelCase__:		list  ):





			"""simple docstring"""


			if len(lowerCAmelCase__  ) <= 1:
						return [tuple(lowerCAmelCase__  )]

			UpperCAmelCase_:		List[Any]							      =     []

			def generate(lowerCAmelCase__:		int		,						lowerCAmelCase__:		list  ):
						if k == 1:
									res.append(tuple(arr[:]  )  )
									return

						generate(k - 1		,						lowerCAmelCase__  )

						for i in range(k - 1  ):
									if k % 2 == 0:  # k is even
												UpperCAmelCase_      ,							UpperCAmelCase_:		Union[str, Any]							      =     arr[k - 1], arr[i]
									else:  # k is odd
												UpperCAmelCase_      ,							UpperCAmelCase_:		Optional[int]							      =     arr[k - 1], arr[0]
									generate(k - 1		,						lowerCAmelCase__  )

			generate(len(lowerCAmelCase__  )		,						lowerCAmelCase__  )
			return res


if __name__ == "__main__":
	a      :  Optional[Any]			     =			input('Enter numbers separated by a comma:\n').strip()
	a      :  str			     =			[int(item) for item in user_input.split(',')]
	print(heaps(arr))






