


'''simple docstring'''

from __future__ import annotations

a_  :				int						= """#"""





class      snake_case    :





  """simple docstring"""




  def __init__(    self     ):







   """simple docstring"""
   lowerCamelCase_      =  {}






  def   snake_case		(    self			,  UpperCamelCase     ):







   """simple docstring"""
   lowerCamelCase_      =  self._trie
   for char in text:
    if char not in trie:
     lowerCamelCase_      =  {}
    lowerCamelCase_      =  trie[char]
   lowerCamelCase_      =  True






  def   snake_case		(    self			,  UpperCamelCase     ):







   """simple docstring"""
   lowerCamelCase_      =  self._trie
   for char in prefix:
    if char in trie:
     lowerCamelCase_      =  trie[char]
    else:
     return []
   return self._elements(UpperCamelCase     )







  def   snake_case		(    self			,  UpperCamelCase     ):







   """simple docstring"""
   lowerCamelCase_      =  []
   for c, v in d.items():
    lowerCamelCase_      =  [" "] if c == END else [(c + s) for s in self._elements(UpperCamelCase     )]
    result.extend(UpperCamelCase     )
   return tuple(UpperCamelCase     )



a_  :				Any						= Trie()
a_  :				Dict						= ("""depart""", """detergent""", """daring""", """dog""", """deer""", """deal""")
for word in words:
     trie.insert_word(word)





def __snake_case					(      UpperCAmelCase_						:						str		):
 lowerCamelCase_      =  trie.find_word(UpperCAmelCase_		)
 return tuple(string + word for word in suffixes		)





def __snake_case					(      ):
 print(autocomplete_using_trie("de"		)		)


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     main()





def  lowerCAmelCase__			(  SCREAMING_SNAKE_CASE_     )				->		list:

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

			lowerCAmelCase__      :      Optional[Any]         =		[]

			def generate(SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_     ):
						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__      ,				lowerCAmelCase__      :      str         =		arr[k - 1], arr[i]
									else:  # k is odd
												lowerCAmelCase__      ,				lowerCAmelCase__      :      Union[str, 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))