"""simple docstring"""





import os





def        a_  (   _lowerCAmelCase						:				List[str]  ):





							'''simple docstring'''

							lowercase__    :	List[str]     					=			len(grid[0]  )
							lowercase__    :	Optional[int]     					=			len(_lowerCAmelCase  )

							lowercase__    :	Dict     					=			0
							lowercase__    :	Union[str, Any]     					=			0
							lowercase__    :	List[Any]     					=			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  ):
																					lowercase__    :	Optional[Any]     					=			grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
																					lowercase__    :	Optional[Any]     					=			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:
																												lowercase__    :	Optional[Any]     					=			(
																												    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:
																												lowercase__    :	Optional[Any]     					=			(
																												    grid[i][j]
																												    * grid[i - 1][j + 1]
																												    * grid[i - 2][j + 2]
																												    * grid[i - 3][j + 3]
																												)

																					lowercase__    :	List[Any]     					=			max(
																					    _lowerCAmelCase     ,				_lowerCAmelCase     ,				_lowerCAmelCase     ,				_lowerCAmelCase  )
																					if max_product > largest:
																												lowercase__    :	Dict     					=			max_product

							return largest





def        a_  (   ):





							'''simple docstring'''

							lowercase__    :	List[str]     					=			[]
							with open(os.path.dirname(_lowerCAmelCase  ) + '/grid.txt'  ) as file:
														for line in file:
																					grid.append(line.strip('\n'  ).split(' '  )  )

							lowercase__    :	Dict     					=			[[int(_lowerCAmelCase  ) for i in grid[j]] for j in range(len(_lowerCAmelCase  )  )]

							return largest_product(_lowerCAmelCase  )


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


"""simple docstring"""





from .glue import GlueDataset, GlueDataTrainingArguments
from .language_modeling import (
    LineByLineTextDataset,
    LineByLineWithRefDataset,
    LineByLineWithSOPTextDataset,
    TextDataset,
    TextDatasetForNextSentencePrediction,
)
from .squad import SquadDataset, SquadDataTrainingArguments

