



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


a	:   Dict       			=       logging.get_logger(__name__)

a	:   Union[str, Any]       			=       {
    'uw-madison/mra-base-512-4': 'https://huggingface.co/uw-madison/mra-base-512-4/resolve/main/config.json',
}







class 							_a							(					lowerCamelCase__ ):
			A							=     'mra'

			def __init__(self,					SCREAMING_SNAKE_CASE_=50265,					SCREAMING_SNAKE_CASE_=768,					SCREAMING_SNAKE_CASE_=12,					SCREAMING_SNAKE_CASE_=12,					SCREAMING_SNAKE_CASE_=3072,					SCREAMING_SNAKE_CASE_="gelu",					SCREAMING_SNAKE_CASE_=0.1,					SCREAMING_SNAKE_CASE_=0.1,					SCREAMING_SNAKE_CASE_=512,					SCREAMING_SNAKE_CASE_=1,					SCREAMING_SNAKE_CASE_=0.0_2,					SCREAMING_SNAKE_CASE_=1E-5,					SCREAMING_SNAKE_CASE_="absolute",					SCREAMING_SNAKE_CASE_=4,					SCREAMING_SNAKE_CASE_="full",					SCREAMING_SNAKE_CASE_=0,					SCREAMING_SNAKE_CASE_=0,					SCREAMING_SNAKE_CASE_=1,					SCREAMING_SNAKE_CASE_=0,					SCREAMING_SNAKE_CASE_=2,					**SCREAMING_SNAKE_CASE_,					)    ->					str:
						super().__init__(pad_token_id=lowercase_,					bos_token_id=lowercase_,					eos_token_id=lowercase_,					**lowercase_ )

						UpperCAmelCase_:						Dict					=			vocab_size
						UpperCAmelCase_:						Dict					=			max_position_embeddings
						UpperCAmelCase_:						Tuple					=			hidden_size
						UpperCAmelCase_:						Union[str, Any]					=			num_hidden_layers
						UpperCAmelCase_:						Optional[Any]					=			num_attention_heads
						UpperCAmelCase_:						Tuple					=			intermediate_size
						UpperCAmelCase_:						List[Any]					=			hidden_act
						UpperCAmelCase_:						Tuple					=			hidden_dropout_prob
						UpperCAmelCase_:						Dict					=			attention_probs_dropout_prob
						UpperCAmelCase_:						Optional[Any]					=			initializer_range
						UpperCAmelCase_:						Tuple					=			type_vocab_size
						UpperCAmelCase_:						Union[str, Any]					=			layer_norm_eps
						UpperCAmelCase_:						str					=			position_embedding_type
						UpperCAmelCase_:						Any					=			block_per_row
						UpperCAmelCase_:						List[Any]					=			approx_mode
						UpperCAmelCase_:						Optional[int]					=			initial_prior_first_n_blocks
						UpperCAmelCase_:						Dict					=			initial_prior_diagonal_n_blocks









import os




def 			UpperCAmelCase__				(			_A      : Any							):





  '''simple docstring'''







  a__  =len(grid[0]							)
  a__  =len(_A							)

  a__  =0
  a__  =0
  a__  =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							):
      a__  =grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
      a__  =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__  =(
            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__  =(
            grid[i][j]
            * grid[i - 1][j + 1]
            * grid[i - 2][j + 2]
            * grid[i - 3][j + 3]
        )

      a__  =max(
          _A	,      _A	,      _A	,      _A							)
      if max_product > largest:
        a__  =max_product

  return largest




def 			UpperCAmelCase__				(			):





  '''simple docstring'''







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

  a__  =[[int(_A							) for i in grid[j]] for j in range(len(_A							)							)]

  return largest_product(_A							)


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