






def      a_ (      _A  )			->			list:







				"""simple docstring"""

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

				snake_case__									=     []

				def generate(_A      ,   _A  ):
								snake_case__									=     [0] * n
								res.append(tuple(_A  )  )

								snake_case__									=     0
								while i < n:
												if c[i] < i:
																if i % 2 == 0:
																				snake_case__							,						snake_case__									=     arr[i], arr[0]
																else:
																				snake_case__							,						snake_case__									=     arr[i], arr[c[i]]
																res.append(tuple(_A  )  )
																c[i] += 1
																snake_case__									=     0
												else:
																snake_case__									=     0
																i += 1

				generate(len(_A  )      ,   _A  )
				return res


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












from __future__ import annotations
def      a_ (      _A  )			->			bool:







				"""simple docstring"""
				return len(set(_A  )  ) == len(_A  )


if __name__ == "__main__":
							import doctest

							doctest.testmod()




