





import argparse
import os
import re

import packaging.version


lowercase_          =		"""examples/"""
lowercase_          =		{
    """examples""": (re.compile(R"""^check_min_version\(\"[^\"]+\"\)\s*$""", re.MULTILINE), """check_min_version(\"VERSION\")\n"""),
    """init""": (re.compile(R"""^__version__\s+=\s+\"([^\"]+)\"\s*$""", re.MULTILINE), """__version__ = \"VERSION\"\n"""),
    """setup""": (re.compile(R"""^(\s*)version\s*=\s*\"[^\"]+\",""", re.MULTILINE), R"""\1version=\"VERSION\","""),
    """doc""": (re.compile(R"""^(\s*)release\s*=\s*\"[^\"]+\"$""", re.MULTILINE), """release = \"VERSION\"\n"""),
}
lowercase_          =		{
    """init""": """src/transformers/__init__.py""",
    """setup""": """setup.py""",
}
lowercase_          =		"""README.md"""




def       __UpperCamelCase  (_SCREAMING_SNAKE_CASE		,						_SCREAMING_SNAKE_CASE		,						_SCREAMING_SNAKE_CASE		)    ->       Tuple:
  with open(_SCREAMING_SNAKE_CASE		,						'r'		,						encoding='utf-8'		,						newline='\n'		) as f:
    lowercase__           =  f.read()
  lowercase__      ,   lowercase__           =  REPLACE_PATTERNS[pattern]
  lowercase__           =  replace.replace('VERSION'		,						_SCREAMING_SNAKE_CASE		)
  lowercase__           =  re_pattern.sub(_SCREAMING_SNAKE_CASE		,						_SCREAMING_SNAKE_CASE		)
  with open(_SCREAMING_SNAKE_CASE		,						'w'		,						encoding='utf-8'		,						newline='\n'		) as f:
    f.write(_SCREAMING_SNAKE_CASE		)




def       __UpperCamelCase  (_SCREAMING_SNAKE_CASE		)    ->       Dict:
  for folder, directories, fnames in os.walk(_SCREAMING_SNAKE_CASE		):
    # Removing some of the folders with non-actively maintained examples from the walk
    if "research_projects" in directories:
      directories.remove('research_projects'		)
    if "legacy" in directories:
      directories.remove('legacy'		)
    for fname in fnames:
      if fname.endswith('.py'		):
        update_version_in_file(os.path.join(_SCREAMING_SNAKE_CASE		,						_SCREAMING_SNAKE_CASE		)		,						_SCREAMING_SNAKE_CASE		,						pattern='examples'		)




def       __UpperCamelCase  (_SCREAMING_SNAKE_CASE		,						_SCREAMING_SNAKE_CASE=False		)    ->       Any:
  for pattern, fname in REPLACE_FILES.items():
    update_version_in_file(_SCREAMING_SNAKE_CASE		,						_SCREAMING_SNAKE_CASE		,						_SCREAMING_SNAKE_CASE		)
  if not patch:
    update_version_in_examples(_SCREAMING_SNAKE_CASE		)




def       __UpperCamelCase  ()    ->       str:
  lowercase__           =  '🤗 Transformers currently provides the following architectures'
  lowercase__           =  '1. Want to contribute a new model?'
  with open(_SCREAMING_SNAKE_CASE		,						'r'		,						encoding='utf-8'		,						newline='\n'		) as f:
    lowercase__           =  f.readlines()

  # Find the start of the list.
  lowercase__           =  0
  while not lines[start_index].startswith(_start_prompt		):
    start_index += 1
  start_index += 1

  lowercase__           =  start_index
  # Update the lines in the model list.
  while not lines[index].startswith(_end_prompt		):
    if lines[index].startswith('1.'		):
      lowercase__           =  lines[index].replace(
          'https://huggingface.co/docs/transformers/main/model_doc'		,						'https://huggingface.co/docs/transformers/model_doc'		,						)
    index += 1

  with open(_SCREAMING_SNAKE_CASE		,						'w'		,						encoding='utf-8'		,						newline='\n'		) as f:
    f.writelines(_SCREAMING_SNAKE_CASE		)




def       __UpperCamelCase  ()    ->       Any:
  with open(REPLACE_FILES['init']		,						'r'		) as f:
    lowercase__           =  f.read()
  lowercase__           =  REPLACE_PATTERNS['init'][0].search(_SCREAMING_SNAKE_CASE		).groups()[0]
  return packaging.version.parse(_SCREAMING_SNAKE_CASE		)




def       __UpperCamelCase  (_SCREAMING_SNAKE_CASE=False		)    ->       Dict:
  lowercase__           =  get_version()
  if patch and default_version.is_devrelease:
    raise ValueError('Can\'t create a patch version from the dev branch, checkout a released version!'		)
  if default_version.is_devrelease:
    lowercase__           =  default_version.base_version
  elif patch:
    lowercase__           =  F"""{default_version.major}.{default_version.minor}.{default_version.micro + 1}"""
  else:
    lowercase__           =  F"""{default_version.major}.{default_version.minor + 1}.0"""

  # Now let's ask nicely if that's the right one.
  lowercase__           =  input(F"""Which version are you releasing? [{default_version}]"""		)
  if len(_SCREAMING_SNAKE_CASE		) == 0:
    lowercase__           =  default_version

  print(F"""Updating version to {version}."""		)
  global_version_update(_SCREAMING_SNAKE_CASE		,						patch=_SCREAMING_SNAKE_CASE		)
  if not patch:
    print('Cleaning main README, don\'t forget to run `make fix-copies`.'		)
    clean_main_ref_in_model_list()




def       __UpperCamelCase  ()    ->       int:
  lowercase__           =  get_version()
  lowercase__           =  F"""{current_version.major}.{current_version.minor + 1}.0.dev0"""
  lowercase__           =  current_version.base_version

  # Check with the user we got that right.
  lowercase__           =  input(F"""Which version are we developing now? [{dev_version}]"""		)
  if len(_SCREAMING_SNAKE_CASE		) == 0:
    lowercase__           =  dev_version

  print(F"""Updating version to {version}."""		)
  global_version_update(_SCREAMING_SNAKE_CASE		)
  print('Cleaning main README, don\'t forget to run `make fix-copies`.'		)
  clean_main_ref_in_model_list()


if __name__ == "__main__":
      lowercase_          =		argparse.ArgumentParser()
      parser.add_argument("""--post_release""", action="""store_true""", help="""Whether this is pre or post release.""")
      parser.add_argument("""--patch""", action="""store_true""", help="""Whether or not this is a patch release.""")
      lowercase_          =		parser.parse_args()
      if not args.post_release:
            pre_release_work(patch=args.patch)
      elif args.patch:
            print("""Nothing to do after a patch :-)""")
      else:
            post_release_work()









import sys

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




def       __UpperCamelCase  (_SCREAMING_SNAKE_CASE = N		)    ->       int:
  lowercase__           =  -sys.maxsize - 1
  for i in range(len(_SCREAMING_SNAKE_CASE		) - 12		):
    lowercase__           =  1
    for j in range(13		):
      product *= int(n[i + j]		)
    if product > largest_product:
      lowercase__           =  product
  return largest_product


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


