


'''simple docstring'''





def        a__     (					UpperCamelCase_						:      Optional[Any]						):

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

   UpperCAmelCase__	:List[Any]      =      []

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

      generate(k - 1,   SCREAMING_SNAKE_CASE_						)

      for i in range(k - 1						):
         if k % 2 == 0:  # k is even
            UpperCAmelCase__   ,						UpperCAmelCase__	:Dict      =      arr[k - 1], arr[i]
         else:  # k is odd
            UpperCAmelCase__   ,						UpperCAmelCase__	:Optional[Any]      =      arr[k - 1], arr[0]
         generate(k - 1,   SCREAMING_SNAKE_CASE_						)

   generate(len(SCREAMING_SNAKE_CASE_						),   SCREAMING_SNAKE_CASE_						)
   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))




'''simple docstring'''


def   A_      (       SCREAMING_SNAKE_CASE_						)			->bool:
  if number < 0:
    raise ValueError("""number must not be negative"""						)
  return number & (number - 1) == 0


if __name__ == "__main__":
       import doctest

       doctest.testmod()

