


import importlib
import shutil
import threading
import warnings
from typing import List

import fsspec
import fsspec.asyn

from . import compression
from .hffilesystem import HfFileSystem


lowerCAmelCase			=				importlib.util.find_spec('s3fs') is not None

if _has_safs:
			from .safilesystem import SaFileSystem  # noqa: F401

lowerCAmelCase			=				[
    compression.BzaFileSystem,
    compression.GzipFileSystem,
    compression.LzaFileSystem,
    compression.XzFileSystem,
    compression.ZstdFileSystem,
]

# Register custom filesystems
for fs_class in COMPRESSION_FILESYSTEMS + [HfFileSystem]:
			if fs_class.protocol in fsspec.registry and fsspec.registry[fs_class.protocol] is not fs_class:
						warnings.warn(f"""A filesystem protocol was already set for {fs_class.protocol} and will be overwritten.""")
			fsspec.register_implementation(fs_class.protocol, fs_class, clobber=True)
def      _a					( SCREAMING_SNAKE_CASE	):


		"""simple docstring"""




		if "://" in dataset_path:
				lowercase__				= dataset_path.split('''://'''	)[1]
		return dataset_path
def      _a					( SCREAMING_SNAKE_CASE	):


		"""simple docstring"""




		if fs is not None and fs.protocol != "file":
				return True
		else:
				return False
def      _a					( SCREAMING_SNAKE_CASE		,							SCREAMING_SNAKE_CASE		,							SCREAMING_SNAKE_CASE	):


		"""simple docstring"""




		lowercase__				= not is_remote_filesystem(SCREAMING_SNAKE_CASE	)
		if is_local:
				# LocalFileSystem.mv does copy + rm, it is more efficient to simply move a local directory
				shutil.move(fs._strip_protocol(SCREAMING_SNAKE_CASE	)		,							fs._strip_protocol(SCREAMING_SNAKE_CASE	)	)
		else:
				fs.mv(SCREAMING_SNAKE_CASE		,							SCREAMING_SNAKE_CASE		,							recursive=SCREAMING_SNAKE_CASE	)
def      _a					( ):


		"""simple docstring"""




		if hasattr(fsspec.asyn		,							'''reset_lock'''	):
				# for future fsspec>2022.05.0
				fsspec.asyn.reset_lock()
		else:
				lowercase__				= None
				lowercase__				= None
				lowercase__				= threading.Lock()









import os



def 						A_							(	)		->					Union[str, Any]:
 with open(os.path.dirname(_lowerCAmelCase	) + "/grid.txt"	) as f:
  UpperCamelCase      :   Optional[Any]			      =  []  # noqa: E741
  for _ in range(20	):
   l.append([int(_lowerCAmelCase	) for x in f.readline().split()]	)

  UpperCamelCase      :   str			      =  0

  # right
  for i in range(20	):
   for j in range(17	):
    UpperCamelCase      :   int			      =  l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
    if temp > maximum:
     UpperCamelCase      :   List[Any]			      =  temp

        # down
  for i in range(17	):
   for j in range(20	):
    UpperCamelCase      :   List[str]			      =  l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
    if temp > maximum:
     UpperCamelCase      :   List[str]			      =  temp

        # diagonal 1
  for i in range(17	):
   for j in range(17	):
    UpperCamelCase      :   Any			      =  l[i][j] * l[i + 1][j + 1] * l[i + 2][j + 2] * l[i + 3][j + 3]
    if temp > maximum:
     UpperCamelCase      :   Tuple			      =  temp

        # diagonal 2
  for i in range(17	):
   for j in range(3				,  20	):
    UpperCamelCase      :   Tuple			      =  l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
    if temp > maximum:
     UpperCamelCase      :   List[Any]			      =  temp
  return maximum


if __name__ == "__main__":
    print(solution())
