



'''simple docstring'''





import sys

_UpperCamelCase											=		(
    """73167176531330624919225119674426574742355349194934"""
    """96983520312774506326239578318016984801869478851843"""
    """85861560789112949495459501737958331952853208805511"""
    """12540698747158523863050715693290963295227443043557"""
    """66896648950445244523161731856403098711121722383113"""
    """62229893423380308135336276614282806444486645238749"""
    """30358907296290491560440772390713810515859307960866"""
    """70172427121883998797908792274921901699720888093776"""
    """65727333001053367881220235421809751254540594752243"""
    """52584907711670556013604839586446706324415722155397"""
    """53697817977846174064955149290862569321978468622482"""
    """83972241375657056057490261407972968652414535100474"""
    """82166370484403199890008895243450658541227588666881"""
    """16427171479924442928230863465674813919123162824586"""
    """17866458359124566529476545682848912883142607690042"""
    """24219022671055626321111109370544217506941658960408"""
    """07198403850962455444362981230987879927244284909188"""
    """84580156166097919133875499200524063689912560717606"""
    """05886116467109405077541002256983155200055935729725"""
    """71636269561882670428252483600823257530420752963450"""
)

def 			a_	(				_lowerCAmelCase = N			) -> Optional[int]:
  __lowerCamelCase			:			Tuple       			=					-sys.maxsize - 1
  for i in range(len(__lowerCAmelCase			) - 12			):
    __lowerCamelCase			:			Tuple       			=					1
    for j in range(13			):
      product *= int(n[i + j]			)
    if product > largest_product:
      __lowerCamelCase			:			List[str]       			=					product
  return largest_product


if __name__ == "__main__":
   print(f'''{solution() = }''')












import argparse
import os
import pickle
import sys

import torch

from transformers import TransfoXLConfig, TransfoXLLMHeadModel, load_tf_weights_in_transfo_xl
from transformers.models.transfo_xl import tokenization_transfo_xl as data_utils
from transformers.models.transfo_xl.tokenization_transfo_xl import CORPUS_NAME, VOCAB_FILES_NAMES
from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, logging


logging.set_verbosity_info()

# We do this to be able to load python 2 datasets pickles
# See e.g. https://stackoverflow.com/questions/2121874/python-pickling-after-changing-a-modules-directory/2121918#2121918
__magic_name__  :  Tuple					=       data_utils.TransfoXLTokenizer
__magic_name__  :  int					=       data_utils.TransfoXLCorpus
__magic_name__  :  List[str]					=       data_utils
__magic_name__  :  str					=       data_utils
def 		a_							( __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase				):
  if transfo_xl_dataset_file:
    # Convert a pre-processed corpus (see original TensorFlow repo)
    with open(__lowerCAmelCase   , '''rb'''				) as fp:
      lowerCAmelCase__										=      pickle.load(__lowerCAmelCase   , encoding='''latin1'''				)
    # Save vocabulary and dataset cache as Dictionaries (should be better than pickles for the long-term)
    lowerCAmelCase__										=      pytorch_dump_folder_path + '''/''' + VOCAB_FILES_NAMES['''pretrained_vocab_file''']
    print(F"""Save vocabulary to {pytorch_vocab_dump_path}"""				)
    lowerCAmelCase__										=      corpus.vocab.__dict__
    torch.save(__lowerCAmelCase   , __lowerCAmelCase				)

    lowerCAmelCase__										=      corpus.__dict__
    corpus_dict_no_vocab.pop('''vocab'''   , __lowerCAmelCase				)
    lowerCAmelCase__										=      pytorch_dump_folder_path + '''/''' + CORPUS_NAME
    print(F"""Save dataset to {pytorch_dataset_dump_path}"""				)
    torch.save(__lowerCAmelCase   , __lowerCAmelCase				)

  if tf_checkpoint_path:
    # Convert a pre-trained TensorFlow model
    lowerCAmelCase__										=      os.path.abspath(__lowerCAmelCase				)
    lowerCAmelCase__										=      os.path.abspath(__lowerCAmelCase				)

    print(F"""Converting Transformer XL checkpoint from {tf_path} with config at {config_path}."""				)
    # Initialise PyTorch model
    if transfo_xl_config_file == "":
      lowerCAmelCase__										=      TransfoXLConfig()
    else:
      lowerCAmelCase__										=      TransfoXLConfig.from_json_file(__lowerCAmelCase				)
    print(F"""Building PyTorch model from configuration: {config}"""				)
    lowerCAmelCase__										=      TransfoXLLMHeadModel(__lowerCAmelCase				)

    lowerCAmelCase__										=      load_tf_weights_in_transfo_xl(__lowerCAmelCase   , __lowerCAmelCase   , __lowerCAmelCase				)
    # Save pytorch-model
    lowerCAmelCase__										=      os.path.join(__lowerCAmelCase   , __lowerCAmelCase				)
    lowerCAmelCase__										=      os.path.join(__lowerCAmelCase   , __lowerCAmelCase				)
    print(F"""Save PyTorch model to {os.path.abspath(__lowerCAmelCase				)}"""				)
    torch.save(model.state_dict()   , __lowerCAmelCase				)
    print(F"""Save configuration file to {os.path.abspath(__lowerCAmelCase				)}"""				)
    with open(__lowerCAmelCase   , '''w'''   , encoding='''utf-8'''				) as f:
      f.write(config.to_json_string()				)


if __name__ == "__main__":
      __magic_name__  :  int					=       argparse.ArgumentParser()
      parser.add_argument(
          """--pytorch_dump_folder_path""",
          default=None,
          type=str,
          required=True,
          help="""Path to the folder to store the PyTorch model or dataset/vocab.""",
      )
      parser.add_argument(
          """--tf_checkpoint_path""",
          default="""""",
          type=str,
          help="""An optional path to a TensorFlow checkpoint path to be converted.""",
      )
      parser.add_argument(
          """--transfo_xl_config_file""",
          default="""""",
          type=str,
          help=(
              """An optional config json file corresponding to the pre-trained BERT model. \n"""
              """This specifies the model architecture."""
          ),
      )
      parser.add_argument(
          """--transfo_xl_dataset_file""",
          default="""""",
          type=str,
          help="""An optional dataset file to be converted in a vocabulary.""",
      )
      __magic_name__  :  Optional[Any]					=       parser.parse_args()
      convert_transfo_xl_checkpoint_to_pytorch(
          args.tf_checkpoint_path,
          args.transfo_xl_config_file,
          args.pytorch_dump_folder_path,
          args.transfo_xl_dataset_file,
      )

