


'''simple docstring'''



import os


def 				lowerCamelCase__				(	A       :      str					):




						'''simple docstring'''






						UpperCAmelCase					    =     len(grid[0]					)
						UpperCAmelCase					    =     len(A					)

						UpperCAmelCase					    =     0
						UpperCAmelCase					    =     0
						UpperCAmelCase					    =     0

						# Check vertically, horizontally, diagonally at the same time (only works
						# for nxn grid)
						for i in range(A					):
												for j in range(n_rows - 3					):
																		UpperCAmelCase					    =     grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
																		UpperCAmelCase					    =     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					    =     (
																								    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					    =     (
																								    grid[i][j]
																								    * grid[i - 1][j + 1]
																								    * grid[i - 2][j + 2]
																								    * grid[i - 3][j + 3]
																								)

																		UpperCAmelCase					    =     max(
																		    A				,       A				,       A				,       A					)
																		if max_product > largest:
																								UpperCAmelCase					    =     max_product

						return largest


def 				lowerCamelCase__				(	):




						'''simple docstring'''






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

						UpperCAmelCase					    =     [[int(A					) for i in grid[j]] for j in range(len(A					)					)]

						return largest_product(A					)


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









'''simple docstring'''



from .data_collator import (
    DataCollatorForLanguageModeling,
    DataCollatorForPermutationLanguageModeling,
    DataCollatorForSeqaSeq,
    DataCollatorForSOP,
    DataCollatorForTokenClassification,
    DataCollatorForWholeWordMask,
    DataCollatorWithPadding,
    DefaultDataCollator,
    default_data_collator,
)
from .metrics import glue_compute_metrics, xnli_compute_metrics
from .processors import (
    DataProcessor,
    InputExample,
    InputFeatures,
    SingleSentenceClassificationProcessor,
    SquadExample,
    SquadFeatures,
    SquadVaProcessor,
    SquadVaProcessor,
    glue_convert_examples_to_features,
    glue_output_modes,
    glue_processors,
    glue_tasks_num_labels,
    squad_convert_examples_to_features,
    xnli_output_modes,
    xnli_processors,
    xnli_tasks_num_labels,
)





