



import os

def 	SCREAMING_SNAKE_CASE_							(	_snake_case	:int				)  ->     List[Any]:
   _A      =       len(grid[0]				)
   _A      =       len(_snake_case				)

   _A      =       0
   _A      =       0
   _A      =       0

   # Check vertically, horizontally, diagonally at the same time (only works
   # for nxn grid)
   for i in range(_snake_case				):
      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(
             _snake_case	,   _snake_case	,   _snake_case	,   _snake_case				)
         if max_product > largest:
            _A      =       max_product

   return largest

def 	SCREAMING_SNAKE_CASE_							(	)  ->     Union[str, Any]:
   _A      =       []
   with open(os.path.dirname(_snake_case				) + '''/grid.txt'''				) as file:
      for line in file:
         grid.append(line.strip('''\n'''				).split(''' '''				)				)

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

   return largest_product(_snake_case				)


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







'''simple docstring'''






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


__A   :    str											= logging.get_logger(__name__)

__A   :    int											= {
    "weiweishi/roc-bert-base-zh": "https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json",
}






class   __snake_case			(  _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase  					=   'roc_bert'

    def __init__(  self       :    str       ,		lowerCamelCase       :    Optional[Any]=3_05_22       ,		lowerCamelCase       :    List[Any]=7_68       ,		lowerCamelCase       :    int=12       ,		lowerCamelCase       :    str=12       ,		lowerCamelCase       :    Any=30_72       ,		lowerCamelCase       :    List[Any]="gelu"       ,		lowerCamelCase       :    Optional[int]=0.1       ,		lowerCamelCase       :    List[str]=0.1       ,		lowerCamelCase       :    int=5_12       ,		lowerCamelCase       :    List[Any]=2       ,		lowerCamelCase       :    int=0.02       ,		lowerCamelCase       :    str=1E-12       ,		lowerCamelCase       :    int=True       ,		lowerCamelCase       :    Optional[Any]=0       ,		lowerCamelCase       :    List[Any]="absolute"       ,		lowerCamelCase       :    str=None       ,		lowerCamelCase       :    str=True       ,		lowerCamelCase       :    Tuple=True       ,		lowerCamelCase       :    str=7_68       ,		lowerCamelCase       :    str=9_10       ,		lowerCamelCase       :    Tuple=5_12       ,		lowerCamelCase       :    List[str]=2_48_58       ,		lowerCamelCase       :    Dict=True       ,		**lowerCamelCase       :    Tuple       ,		)  ->    Optional[int]:
      lowerCAmelCase_     : Optional[Any]     =  vocab_size
      lowerCAmelCase_     : Any     =  max_position_embeddings
      lowerCAmelCase_     : Any     =  hidden_size
      lowerCAmelCase_     : int     =  num_hidden_layers
      lowerCAmelCase_     : Tuple     =  num_attention_heads
      lowerCAmelCase_     : List[Any]     =  intermediate_size
      lowerCAmelCase_     : Tuple     =  hidden_act
      lowerCAmelCase_     : List[Any]     =  hidden_dropout_prob
      lowerCAmelCase_     : Dict     =  attention_probs_dropout_prob
      lowerCAmelCase_     : Any     =  initializer_range
      lowerCAmelCase_     : Any     =  type_vocab_size
      lowerCAmelCase_     : Optional[int]     =  layer_norm_eps
      lowerCAmelCase_     : Tuple     =  use_cache
      lowerCAmelCase_     : List[Any]     =  enable_pronunciation
      lowerCAmelCase_     : List[Any]     =  enable_shape
      lowerCAmelCase_     : List[str]     =  pronunciation_embed_dim
      lowerCAmelCase_     : List[str]     =  pronunciation_vocab_size
      lowerCAmelCase_     : Dict     =  shape_embed_dim
      lowerCAmelCase_     : Optional[Any]     =  shape_vocab_size
      lowerCAmelCase_     : List[Any]     =  concat_input
      lowerCAmelCase_     : Any     =  position_embedding_type
      lowerCAmelCase_     : List[str]     =  classifier_dropout
      super().__init__(pad_token_id=lowerCamelCase       ,		**lowerCamelCase						)



