





class    lowerCAmelCase							:
 def __init__(      self  :      int			,     UpperCAmelCase  :      int	)			->	Union[str, Any]:
     lowerCamelCase__    :      Any					 =		n
     lowerCamelCase__    :      str					 =		[None] * self.n
     lowerCamelCase__    :      List[str]					 =		0  # index of the first element
     lowerCamelCase__    :      List[str]					 =		0
     lowerCamelCase__    :      Any					 =		0
 def __len__(      self  :      Tuple	)			->	Optional[int]:
     return self.size
 def      A_	(      self  :      int	)			->	Union[str, Any]:
     return self.size == 0
 def      A_	(      self  :      str	)			->	Optional[Any]:
     return False if self.is_empty() else self.array[self.front]
 def      A_	(      self  :      Union[str, Any]			,     UpperCAmelCase  :      Dict	)			->	str:
     if self.size >= self.n:
         raise Exception('QUEUE IS FULL'	)

     lowerCamelCase__    :      int					 =		data
     lowerCamelCase__    :      Union[str, Any]					 =		(self.rear + 1) % self.n
     self.size += 1
     return self







 def      A_	(      self  :      Union[str, Any]	)			->	Optional[int]:
     if self.size == 0:
         raise Exception('UNDERFLOW'	)

     lowerCamelCase__    :      str					 =		self.array[self.front]
     lowerCamelCase__    :      Tuple					 =		None
     lowerCamelCase__    :      Tuple					 =		(self.front + 1) % self.n
     self.size -= 1
     return temp







def 						UpperCAmelCase			(	a_						)		->	list:







				"""simple docstring"""



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

				__A   			= []

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

								generate(k - 1		,   a_						)

								for i in range(k - 1						):
												if k % 2 == 0:  # k is even
																__A			,							__A   			= arr[k - 1], arr[i]
												else:  # k is odd
																__A			,							__A   			= arr[k - 1], arr[0]
												generate(k - 1		,   a_						)

				generate(len(a_						)		,   a_						)
				return res


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