
import os







def 						_snake_case(  SCREAMING_SNAKE_CASE__				) ->    Tuple:
       lowercase							:     Dict       	=      len(grid[0]				)
       lowercase							:     Dict       	=      len(SCREAMING_SNAKE_CASE__				)

       lowercase							:     Tuple       	=      0
       lowercase							:     str       	=      0
       lowercase							:     Tuple       	=      0

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

                     lowercase							:     Optional[Any]       	=      max(
                         SCREAMING_SNAKE_CASE__					,	SCREAMING_SNAKE_CASE__					,	SCREAMING_SNAKE_CASE__					,	SCREAMING_SNAKE_CASE__				)
                     if max_product > largest:
                            lowercase							:     Any       	=      max_product

       return largest







def 						_snake_case(  ) ->    Optional[Any]:
       lowercase							:     List[Any]       	=      []
       with open(os.path.dirname(SCREAMING_SNAKE_CASE__				) + """/grid.txt"""				) as file:
              for line in file:
                     grid.append(line.strip("""\n"""				).split(""" """				)				)

       lowercase							:     Dict       	=      [[int(SCREAMING_SNAKE_CASE__				) for i in grid[j]] for j in range(len(SCREAMING_SNAKE_CASE__				)				)]

       return largest_product(SCREAMING_SNAKE_CASE__				)


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


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


lowercase  :					List[str]						    =							logging.get_logger(__name__)

lowercase  :					Any						    =							{
    """uclanlp/visualbert-vqa""": """https://huggingface.co/uclanlp/visualbert-vqa/resolve/main/config.json""",
    """uclanlp/visualbert-vqa-pre""": """https://huggingface.co/uclanlp/visualbert-vqa-pre/resolve/main/config.json""",
    """uclanlp/visualbert-vqa-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-vqa-coco-pre/resolve/main/config.json"""
    ),
    """uclanlp/visualbert-vcr""": """https://huggingface.co/uclanlp/visualbert-vcr/resolve/main/config.json""",
    """uclanlp/visualbert-vcr-pre""": """https://huggingface.co/uclanlp/visualbert-vcr-pre/resolve/main/config.json""",
    """uclanlp/visualbert-vcr-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-vcr-coco-pre/resolve/main/config.json"""
    ),
    """uclanlp/visualbert-nlvr2""": """https://huggingface.co/uclanlp/visualbert-nlvr2/resolve/main/config.json""",
    """uclanlp/visualbert-nlvr2-pre""": """https://huggingface.co/uclanlp/visualbert-nlvr2-pre/resolve/main/config.json""",
    """uclanlp/visualbert-nlvr2-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-nlvr2-coco-pre/resolve/main/config.json"""
    )
    # See all VisualBERT models at https://huggingface.co/models?filter=visual_bert
}

class __snake_case		(      lowerCAmelCase     ):
    _a		:						Union[str, Any]=				"visual_bert"
    def __init__(  self		,snake_case=30522		,snake_case=768		,snake_case=512		,snake_case=12		,snake_case=12		,snake_case=3072		,snake_case="gelu"		,snake_case=0.1		,snake_case=0.1		,snake_case=512		,snake_case=2		,snake_case=0.02		,snake_case=1e-12		,snake_case=False		,snake_case=True		,snake_case=1		,snake_case=0		,snake_case=2		,**snake_case		,):



           '''simple docstring'''







           super().__init__(pad_token_id=snake_case		,bos_token_id=snake_case		,eos_token_id=snake_case		,**snake_case      )

           lowercase							:     Tuple       	=      vocab_size
           lowercase							:     int       	=      max_position_embeddings
           lowercase							:     Optional[Any]       	=      hidden_size
           lowercase							:     int       	=      visual_embedding_dim
           lowercase							:     Tuple       	=      num_hidden_layers
           lowercase							:     str       	=      num_attention_heads
           lowercase							:     Optional[Any]       	=      intermediate_size
           lowercase							:     str       	=      hidden_act
           lowercase							:     Tuple       	=      hidden_dropout_prob
           lowercase							:     List[Any]       	=      attention_probs_dropout_prob
           lowercase							:     Union[str, Any]       	=      initializer_range
           lowercase							:     int       	=      type_vocab_size
           lowercase							:     Union[str, Any]       	=      layer_norm_eps
           lowercase							:     Union[str, Any]       	=      bypass_transformer
           lowercase							:     int       	=      special_visual_initialize
