
"""simple docstring"""






import re
from pathlib import Path
from unittest import TestCase

import pytest





@pytest.mark.integration
class 				snake_case    (			SCREAMING_SNAKE_CASE_						):







   def 					UpperCAmelCase__     (      self    ,				__UpperCAmelCase)					->Optional[int]:







      with open(__UpperCAmelCase    ,				encoding="utf-8") as input_file:
         a_							=			re.compile(r"(?!.*\b(?:encoding|rb|w|wb|w+|wb+|ab|ab+)\b)(?<=\s)(open)\((.*)\)")
         a_							=			input_file.read()
         a_							=			regexp.search(__UpperCAmelCase)

      return match







   def 					UpperCAmelCase__     (      self    ,				__UpperCAmelCase)					->str:







      with open(__UpperCAmelCase    ,				encoding="utf-8") as input_file:
         a_							=			re.compile(r"#[^\r\n]*print\(|\"[^\r\n]*print\(|\"\"\".*?print\(.*?\"\"\"|(print\()"    ,				re.DOTALL)
         a_							=			input_file.read()
         # use `re.finditer` to handle the case where the ignored groups would be matched first by `re.search`
         a_							=			regexp.finditer(__UpperCAmelCase)

      a_							=			[match for match in matches if match is not None and match.group(1) is not None]
      return matches[0] if matches else None







   def 					UpperCAmelCase__     (      self)					->Optional[Any]:
      a_							=			Path("./datasets")
      a_							=			list(dataset_paths.absolute().glob("**/*.py"))

      for dataset in dataset_files:
         if self._no_encoding_on_file_open(str(__UpperCAmelCase)):
            raise AssertionError(F'''open(...) must use utf-8 encoding in {dataset}''')







   def 					UpperCAmelCase__     (      self)					->Any:
      a_							=			Path("./datasets")
      a_							=			list(dataset_paths.absolute().glob("**/*.py"))

      for dataset in dataset_files:
         if self._no_print_statements(str(__UpperCAmelCase)):
            raise AssertionError(F'''print statement found in {dataset}. Use datasets.logger/logging instead.''')

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