

'''simple docstring'''





import tempfile
import unittest

from make_student import create_student_by_copying_alternating_layers

from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch


UpperCamelCase_    						=       """sshleifer/bart-tiny-random"""
UpperCamelCase_    						=       """patrickvonplaten/t5-tiny-random"""





@require_torch
class 		__SCREAMING_SNAKE_CASE							(			unittest.TestCase      ):







				@cached_property
				def  lowerCamelCase_	(       self     :		Union[str, Any]   ):
										'''simple docstring'''
										return AutoConfig.from_pretrained(UpperCAmelCase__   )







				def  lowerCamelCase_	(       self     :		Union[str, Any]   ):
										'''simple docstring'''
										lowercase		,	*lowercase :							List[str]    		=create_student_by_copying_alternating_layers(UpperCAmelCase__		,					tempfile.mkdtemp()		,					e=1		,					d=1   )
										self.assertEqual(student.config.num_hidden_layers		,					1   )







				def  lowerCamelCase_	(       self     :		Tuple   ):
										'''simple docstring'''
										lowercase		,	*lowercase :							List[Any]    		=create_student_by_copying_alternating_layers(UpperCAmelCase__		,					tempfile.mkdtemp()		,					e=1		,					d=UpperCAmelCase__   )







				def  lowerCamelCase_	(       self     :		Optional[int]   ):
										'''simple docstring'''
										lowercase		,	*lowercase :							int    		=create_student_by_copying_alternating_layers(UpperCAmelCase__		,					tempfile.mkdtemp()		,					e=1		,					d=UpperCAmelCase__   )
										self.assertEqual(student.config.encoder_layers		,					1   )
										self.assertEqual(student.config.decoder_layers		,					self.teacher_config.encoder_layers   )







				def  lowerCamelCase_	(       self     :		Dict   ):
										'''simple docstring'''
										lowercase		,	*lowercase :							Union[str, Any]    		=create_student_by_copying_alternating_layers(UpperCAmelCase__		,					tempfile.mkdtemp()		,					e=1		,					d=1   )
										self.assertEqual(student.config.encoder_layers		,					1   )
										self.assertEqual(student.config.decoder_layers		,					1   )







				def  lowerCamelCase_	(       self     :		List[Any]   ):
										'''simple docstring'''
										with self.assertRaises(UpperCAmelCase__   ):
																create_student_by_copying_alternating_layers(UpperCAmelCase__		,					tempfile.mkdtemp()		,					e=UpperCAmelCase__		,					d=UpperCAmelCase__   )






"""simple docstring"""


def      lowerCamelCase_					(   __lowerCAmelCase							)				->   list:




						'''simple docstring'''



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

						lowerCamelCase__   =[]

						def generate(__lowerCAmelCase  ,       __lowerCAmelCase							):
												lowerCamelCase__   =[0] * n
												res.append(tuple(__lowerCAmelCase							)							)

												lowerCamelCase__   =0
												while i < n:
																		if c[i] < i:
																								if i % 2 == 0:
																														lowerCamelCase__   , lowerCamelCase__   =arr[i], arr[0]
																								else:
																														lowerCamelCase__   , lowerCamelCase__   =arr[i], arr[c[i]]
																								res.append(tuple(__lowerCAmelCase							)							)
																								c[i] += 1
																								lowerCamelCase__   =0
																		else:
																								lowerCamelCase__   =0
																								i += 1

						generate(len(__lowerCAmelCase							)  ,       __lowerCAmelCase							)
						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))


