



def 		a__      (		_UpperCamelCase      :			list				):

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

   __lowerCamelCase    				=     []

   def generate(_UpperCamelCase      :			int			,_UpperCamelCase      :			list				):
      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
            __lowerCamelCase    				=     arr[k - 1], arr[i]
         else:  # k is odd
            __lowerCamelCase    				=     arr[k - 1], arr[0]
         generate(k - 1			,SCREAMING_SNAKE_CASE__				)

   generate(len(SCREAMING_SNAKE_CASE__				)			,SCREAMING_SNAKE_CASE__				)
   return res


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











"""simple docstring"""




def 		__snake_case		( SCREAMING_SNAKE_CASE__      :		str							)    ->  bool:





     '''simple docstring'''

     _UpperCAmelCase     :      str														=       0
     for ch in input_str:
          _UpperCAmelCase     :      Optional[int]														=       ord(SCREAMING_SNAKE_CASE__							)
          _UpperCAmelCase     :      int														=       pow(2		,    SCREAMING_SNAKE_CASE__							)

          # If we already turned on bit for current character's unicode
          if bitmap >> ch_unicode & 1 == 1:
               return False
          bitmap |= ch_bit_index_on
     return True


if __name__ == "__main__":
 import doctest

 doctest.testmod()
