
import os




def       _SCREAMING_SNAKE_CASE   (						_lowerCamelCase					:     List[Any])   ->       Union[str, Any]:






							'''simple docstring'''





							__UpperCamelCase      :  Optional[int]       =   len(grid[0])
							__UpperCamelCase      :  Tuple       =   len(_lowerCamelCase)

							__UpperCamelCase      :  Optional[int]       =   0
							__UpperCamelCase      :  int       =   0
							__UpperCamelCase      :  int       =   0

							# Check vertically, horizontally, diagonally at the same time (only works
							# for nxn grid)
							for i in range(_lowerCamelCase):
														for j in range(n_rows - 3):
																					__UpperCamelCase      :  int       =   grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
																					__UpperCamelCase      :  Optional[int]       =   grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

																					# Left-to-right diagonal (\) product
																					if i < n_columns - 3:
																												__UpperCamelCase      :  str       =   (
																												    grid[i][j]
																												    * grid[i + 1][j + 1]
																												    * grid[i + 2][j + 2]
																												    * grid[i + 3][j + 3]
																												)

																					# Right-to-left diagonal(/) product
																					if i > 2:
																												__UpperCamelCase      :  int       =   (
																												    grid[i][j]
																												    * grid[i - 1][j + 1]
																												    * grid[i - 2][j + 2]
																												    * grid[i - 3][j + 3]
																												)

																					__UpperCamelCase      :  str       =   max(
																					    _lowerCamelCase		,    _lowerCamelCase		,    _lowerCamelCase		,    _lowerCamelCase)
																					if max_product > largest:
																												__UpperCamelCase      :  Optional[int]       =   max_product

							return largest




def       _SCREAMING_SNAKE_CASE   (						)   ->       Dict:






							'''simple docstring'''





							__UpperCamelCase      :  Optional[int]       =   []
							with open(os.path.dirname(_lowerCamelCase) + "/grid.txt") as file:
														for line in file:
																					grid.append(line.strip("\n").split(" "))

							__UpperCamelCase      :  Tuple       =   [[int(_lowerCamelCase) for i in grid[j]] for j in range(len(_lowerCamelCase))]

							return largest_product(_lowerCamelCase)


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

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


lowercase    :   Optional[int]						=			{
    'configuration_mobilevit': ['MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MobileViTConfig', 'MobileViTOnnxConfig'],
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase    :   List[str]						=			['MobileViTFeatureExtractor']
		lowercase    :   Tuple						=			['MobileViTImageProcessor']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase    :   List[Any]						=			[
		    'MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'MobileViTForImageClassification',
		    'MobileViTForSemanticSegmentation',
		    'MobileViTModel',
		    'MobileViTPreTrainedModel',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase    :   List[Any]						=			[
		    'TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFMobileViTForImageClassification',
		    'TFMobileViTForSemanticSegmentation',
		    'TFMobileViTModel',
		    'TFMobileViTPreTrainedModel',
		]

if TYPE_CHECKING:
		from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_mobilevit import MobileViTFeatureExtractor
				from .image_processing_mobilevit import MobileViTImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_mobilevit import (
				    MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    MobileViTForImageClassification,
				    MobileViTForSemanticSegmentation,
				    MobileViTModel,
				    MobileViTPreTrainedModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_mobilevit import (
				    TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFMobileViTForImageClassification,
				    TFMobileViTForSemanticSegmentation,
				    TFMobileViTModel,
				    TFMobileViTPreTrainedModel,
				)


else:
		import sys

		lowercase    :   Optional[int]						=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)