



"""simple docstring"""

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase__			   =  logging.get_logger(__name__)

lowercase__			   =  {
    "facebook/timesformer": "https://huggingface.co/facebook/timesformer/resolve/main/config.json",
}




class SCREAMING_SNAKE_CASE__					(		__snake_case      ):
						_lowerCAmelCase							=					"timesformer"



						def __init__(self						,     _lowercase=224						,     _lowercase=16						,     _lowercase=3						,     _lowercase=8						,     _lowercase=768						,     _lowercase=12						,     _lowercase=12						,     _lowercase=3072						,     _lowercase="gelu"						,     _lowercase=0.0						,     _lowercase=0.0						,     _lowercase=0.02						,     _lowercase=1e-6						,     _lowercase=True						,     _lowercase="divided_space_time"						,     _lowercase=0						,     **_lowercase						,     ):





													'''simple docstring'''

													super().__init__(**_lowercase							)

													__a		:		Union[str, Any]									=       image_size
													__a		:		Optional[Any]									=       patch_size
													__a		:		Union[str, Any]									=       num_channels
													__a		:		Optional[int]									=       num_frames

													__a		:		Optional[int]									=       hidden_size
													__a		:		Any									=       num_hidden_layers
													__a		:		str									=       num_attention_heads
													__a		:		Optional[Any]									=       intermediate_size
													__a		:		Dict									=       hidden_act
													__a		:		List[Any]									=       hidden_dropout_prob
													__a		:		str									=       attention_probs_dropout_prob
													__a		:		Any									=       initializer_range
													__a		:		Tuple									=       layer_norm_eps
													__a		:		Optional[Any]									=       qkv_bias

													__a		:		Union[str, Any]									=       attention_type
													__a		:		Optional[Any]									=       drop_path_rate






"""simple docstring"""

import os





def       __magic_name__    (   _lowerCamelCase				: Dict					):
							__a		:		List[str]									=       len(grid[0]					)
							__a		:		int									=       len(_lowerCamelCase					)

							__a		:		Tuple									=       0
							__a		:		List[Any]									=       0
							__a		:		List[str]									=       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					):
																					__a		:		List[Any]									=       grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
																					__a		:		Tuple									=       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:
																												__a		:		List[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:
																												__a		:		List[Any]									=       (
																												    grid[i][j]
																												    * grid[i - 1][j + 1]
																												    * grid[i - 2][j + 2]
																												    * grid[i - 3][j + 3]
																												)

																					__a		:		str									=       max(
																					    _lowerCamelCase  ,       _lowerCamelCase  ,       _lowerCamelCase  ,       _lowerCamelCase					)
																					if max_product > largest:
																												__a		:		Optional[Any]									=       max_product

							return largest





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

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

							return largest_product(_lowerCamelCase					)


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

