




'''simple docstring'''


import argparse

import torch

from transformers import LxmertConfig, LxmertForPreTraining, load_tf_weights_in_lxmert
from transformers.utils import logging


logging.set_verbosity_info()


def 						SCREAMING_SNAKE_CASE       (      a_	:							Optional[int]				,					a_	:							Union[str, Any]				,					a_	:							Optional[int]			):
  # Initialise PyTorch model
  __a			=					LxmertConfig.from_json_file(lowercase_			)
  print(f"Building PyTorch model from configuration: {config}"			)
  __a			=					LxmertForPreTraining(lowercase_			)

  # Load weights from tf checkpoint
  load_tf_weights_in_lxmert(lowercase_				,					lowercase_				,					lowercase_			)

  # Save pytorch-model
  print(f"Save PyTorch model to {pytorch_dump_path}"			)
  torch.save(model.state_dict()				,					lowercase_			)


if __name__ == "__main__":
  lowercase_ 		=      argparse.ArgumentParser()
  # Required parameters
  parser.add_argument(
      "--tf_checkpoint_path", default=None, type=str, required=True, help="Path to the TensorFlow checkpoint path."
  )
  parser.add_argument(
      "--config_file",
      default=None,
      type=str,
      required=True,
      help="The config json file corresponding to the pre-trained model. \nThis specifies the model architecture.",
  )
  parser.add_argument(
      "--pytorch_dump_path", default=None, type=str, required=True, help="Path to the output PyTorch model."
  )
  lowercase_ 		=      parser.parse_args()
  convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.config_file, args.pytorch_dump_path)









'''simple docstring'''


import os


def 						SCREAMING_SNAKE_CASE       (      ):
  with open(os.path.dirname(a_			) + '/grid.txt'			) as f:
    __a			=					[]  # noqa: E741
    for _ in range(20			):
      l.append([int(a_			) for x in f.readline().split()]			)

    __a			=					0

    # right
    for i in range(20			):
      for j in range(17			):
        __a			=					l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
        if temp > maximum:
          __a			=					temp

        # down
    for i in range(17			):
      for j in range(20			):
        __a			=					l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
        if temp > maximum:
          __a			=					temp

        # diagonal 1
    for i in range(17			):
      for j in range(17			):
        __a			=					l[i][j] * l[i + 1][j + 1] * l[i + 2][j + 2] * l[i + 3][j + 3]
        if temp > maximum:
          __a			=					temp

        # diagonal 2
    for i in range(17			):
      for j in range(3				,					20			):
        __a			=					l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
        if temp > maximum:
          __a			=					temp
    return maximum


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



