"""simple docstring"""




import math






def   UpperCAmelCase					(	UpperCamelCase__				):






							"""simple docstring"""





							A__	     =							0
							A__	     =							0
							while num > 0:
														A__	     =							num % 8
														A__	     =							octal + (remainder * math.floor(math.pow(10       ,    UpperCamelCase__				)				))
														counter += 1
														A__	     =							math.floor(num / 8				)  # basically /= 8 without remainder if any
														# This formatting removes trailing '.0' from `octal`.
							return F'''0o{int(UpperCamelCase__				)}'''






def   UpperCAmelCase					(	):






							"""simple docstring"""





							print('\n2 in octal is:'				)
							print(decimal_to_octal(2				)				)  # = 2
							print('\n8 in octal is:'				)
							print(decimal_to_octal(8				)				)  # = 10
							print('\n65 in octal is:'				)
							print(decimal_to_octal(65				)				)  # = 101
							print('\n216 in octal is:'				)
							print(decimal_to_octal(216				)				)  # = 330
							print('\n512 in octal is:'				)
							print(decimal_to_octal(512				)				)  # = 1000
							print('\n'				)


if __name__ == "__main__":
				main()






"""simple docstring"""




def   UpperCAmelCase					(	UpperCamelCase__				):






							"""simple docstring"""





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

							A__	     =							[]

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

														generate(k - 1       ,    UpperCamelCase__				)

														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       ,    UpperCamelCase__				)

							generate(len(UpperCamelCase__				)       ,    UpperCamelCase__				)
							return res


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





