






import copy
import random

from transformers import CLIPTokenizer







class  _lowercase   (   _A						):
      def __init__(     self				,			*a				,			**a   ):
       super().__init__(*a				,			**a   )
       snake_case__  :    Optional[Any]							       ={}
      def 						lowercase__					(     self				,			a				,			*a				,			**a   ):
       snake_case__  :    Any							       =super().add_tokens(a				,			*a				,			**a   )
       if num_added_tokens == 0:
        raise ValueError(
            F"The tokenizer already contains the token {placeholder_token}. Please pass a different"
            """ `placeholder_token` that is not already in the tokenizer."""   )
      def 						lowercase__					(     self				,			a				,			*a				,			a=1				,			**a   ):
       snake_case__  :    Optional[int]							       =[]
       if num_vec_per_token == 1:
        self.try_adding_tokens(a				,			*a				,			**a   )
        output.append(a   )
       else:
        snake_case__  :    Tuple							       =[]
        for i in range(a   ):
         snake_case__  :    str							       =placeholder_token + F"_{i}"
         self.try_adding_tokens(a				,			*a				,			**a   )
         output.append(a   )
        # handle cases where there is a new placeholder token that contains the current placeholder token but is larger
       for token in self.token_map:
        if token in placeholder_token:
         raise ValueError(
             F"The tokenizer already has placeholder token {token} that can get confused with"
             F" {placeholder_token}keep placeholder tokens independent"   )
       snake_case__  :    Dict							       =output
      def 						lowercase__					(     self				,			a				,			a=False				,			a=1.0   ):
       if isinstance(a				,			a   ):
        snake_case__  :    Dict							       =[]
        for i in range(len(a   )   ):
         output.append(self.replace_placeholder_tokens_in_text(text[i]				,			vector_shuffle=a   )   )
        return output
       for placeholder_token in self.token_map:
        if placeholder_token in text:
         snake_case__  :    List[str]							       =self.token_map[placeholder_token]
         snake_case__  :    Any							       =tokens[: 1 + int(len(a   ) * prop_tokens_to_load   )]
         if vector_shuffle:
          snake_case__  :    Optional[int]							       =copy.copy(a   )
          random.shuffle(a   )
         snake_case__  :    Dict							       =text.replace(a				,			""" """.join(a   )   )
       return text
      def __call__(     self				,			a				,			*a				,			a=False				,			a=1.0				,			**a   ):
       return super().__call__(
           self.replace_placeholder_tokens_in_text(
               a				,			vector_shuffle=a				,			prop_tokens_to_load=a   )				,			*a				,			**a				,			)



      def 						lowercase__					(     self				,			a				,			*a				,			a=False				,			a=1.0				,			**a   ):
       return super().encode(
           self.replace_placeholder_tokens_in_text(
               a				,			vector_shuffle=a				,			prop_tokens_to_load=a   )				,			*a				,			**a				,			)













def 			A__							(      _a  :					list	):





 '''simple docstring'''







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

 snake_case__  :    Optional[int]							       =[]

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

 generate(len(_a	)		,  _a	)
 return res


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





