
import argparse

from transformers import TaConfig, TaForConditionalGeneration, load_tf_weights_in_ta
from transformers.utils import logging


logging.set_verbosity_info()
def  lowerCAmelCase__			(  SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_     )				->		Any:
			# Initialise PyTorch model
			lowerCAmelCase__      :      List[str]         =		TaConfig.from_json_file(SCREAMING_SNAKE_CASE_     )
			print(F'''Building PyTorch model from configuration: {config}'''     )
			lowerCAmelCase__      :      Union[str, Any]         =		TaForConditionalGeneration(SCREAMING_SNAKE_CASE_     )

			# Load weights from tf checkpoint
			load_tf_weights_in_ta(SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_       ,							SCREAMING_SNAKE_CASE_     )

			# Save pytorch-model
			print(F'''Save PyTorch model to {pytorch_dump_path}'''     )
			model.save_pretrained(SCREAMING_SNAKE_CASE_     )


if __name__ == "__main__":
					lowerCamelCase__          =		argparse.ArgumentParser()
					# Required parameters
					parser.add_argument(
					    """--tf_checkpoint_path""", default=None, type=str, required=True, help="""Path to the TensorFlow checkpoint path."""
					)
					parser.add_argument(
					    """--config_file""",
					    default=None,
					    type=str,
					    required=True,
					    help=(
					        """The config json file corresponding to the pre-trained T5 model. \nThis specifies the model architecture."""
					    ),
					)
					parser.add_argument(
					    """--pytorch_dump_path""", default=None, type=str, required=True, help="""Path to the output PyTorch model."""
					)
					lowerCamelCase__          =		parser.parse_args()
					convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.config_file, args.pytorch_dump_path)

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