


'''simple docstring'''
import doctest
import logging
import os
import unittest
from pathlib import Path
from typing import List, Union

import transformers
from transformers.testing_utils import require_tf, require_torch, slow


lowerCAmelCase   : List[Any]             =				logging.getLogger()




@unittest.skip('''Temporarily disable the doc tests.''')
@require_torch
@require_tf
@slow
class        _UpperCamelCase	(    unittest.TestCase):


				'''simple docstring'''


				def 	a__		(     self							,      a_							,      a_ = None							,      a_ = None							,      a_ = None							,      a_ = True							,      )    ->  Tuple:
					lowercase						:		Any   					=		[file for file in os.listdir(a_							) if os.path.isfile(os.path.join(a_							,      a_							)							)]

					if identifier is not None:
						lowercase						:		Union[str, Any]   					=		[file for file in files if identifier in file]

					if n_identifier is not None:
						if isinstance(a_							,      a_							):
							for n_ in n_identifier:
								lowercase						:		Optional[Any]   					=		[file for file in files if n_ not in file]
						else:
							lowercase						:		List[str]   					=		[file for file in files if n_identifier not in file]

					lowercase						:		Dict   					=		ignore_files or []
					ignore_files.append("__init__.py"							)
					lowercase						:		Tuple   					=		[file for file in files if file not in ignore_files]

					for file in files:
						# Open all files
						print("Testing"							,      a_							)

						if only_modules:
							lowercase						:		Any   					=		file.split("."							)[0]
							try:
								lowercase						:		Union[str, Any]   					=		getattr(a_							,      a_							)
								lowercase						:		str   					=		doctest.DocTestSuite(a_							)
								lowercase						:		List[str]   					=		unittest.TextTestRunner().run(a_							)
								self.assertIs(len(result.failures							)							,      0							)
							except AttributeError:
								logger.info(F'''{module_identifier} is not a module.'''							)
						else:
							lowercase						:		Any   					=		doctest.testfile(str(".." / directory / file							)							,      optionflags=doctest.ELLIPSIS							)
							self.assertIs(result.failed							,      0							)

				def 	a__		(     self							)    ->  List[str]:
					lowercase						:		Optional[int]   					=		Path("src/transformers"							)
					lowercase						:		Tuple   					=		"modeling"
					lowercase						:		Tuple   					=		[
					    "modeling_ctrl.py",
					    "modeling_tf_ctrl.py",
					]
					self.analyze_directory(a_							,      identifier=a_							,      ignore_files=a_							)

				def 	a__		(     self							)    ->  List[str]:
					lowercase						:		Optional[int]   					=		Path("src/transformers"							)
					lowercase						:		List[str]   					=		"tokenization"
					self.analyze_directory(a_							,      identifier=a_							)

				def 	a__		(     self							)    ->  List[Any]:
					lowercase						:		Tuple   					=		Path("src/transformers"							)
					lowercase						:		List[str]   					=		"configuration"
					self.analyze_directory(a_							,      identifier=a_							)

				def 	a__		(     self							)    ->  List[Any]:
					lowercase						:		List[Any]   					=		Path("src/transformers"							)
					lowercase						:		Optional[int]   					=		["configuration", "modeling", "tokenization"]
					self.analyze_directory(a_							,      n_identifier=a_							)


				def 	a__		(     self							)    ->  List[str]:
					lowercase						:		Dict   					=		Path("docs/source"							)
					lowercase						:		Dict   					=		["favicon.ico"]
					self.analyze_directory(a_							,      ignore_files=a_							,      only_modules=a_							)






'''simple docstring'''
def 	_A  (       A							)  ->				list:

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

	lowercase						:		Dict   					=		[]

	def generate(A							,A							):
		lowercase						:		List[Any]   					=		[0] * n
		res.append(tuple(A							)							)

		lowercase						:		Tuple   					=		0
		while i < n:
			if c[i] < i:
				if i % 2 == 0:
					lowercase					,		lowercase						:		List[Any]   					=		arr[i], arr[0]
				else:
					lowercase					,		lowercase						:		Optional[Any]   					=		arr[i], arr[c[i]]
				res.append(tuple(A							)							)
				c[i] += 1
				lowercase						:		Optional[Any]   					=		0
			else:
				lowercase						:		Any   					=		0
				i += 1

	generate(len(A							)							,A							)
	return res


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


