"""simple docstring"""



import json
import os
import unittest

from transformers.models.blenderbot_small.tokenization_blenderbot_small import (
    VOCAB_FILES_NAMES,
    BlenderbotSmallTokenizer,
)

from ...test_tokenization_common import TokenizerTesterMixin






class 				snake_case__     (   snake_case_,		unittest.TestCase   ):
 _snake_case   :			int           =		BlenderbotSmallTokenizer
 _snake_case   :			int           =		False


 def 		a__ (				self		):
        super().setUp()

        __a     				=  ["__start__", "adapt", "act", "ap@@", "te", "__end__", "__unk__"]
        __a     				=  dict(zip(lowerCamelCase  ,						range(len(lowerCamelCase		)		)		)		)

        __a     				=  ["#version: 0.2", "a p", "t e</w>", "ap t</w>", "a d", "ad apt</w>", "a c", "ac t</w>", ""]
        __a     				=  {"unk_token": "__unk__", "bos_token": "__start__", "eos_token": "__end__"}

        __a     				=  os.path.join(self.tmpdirname  ,						VOCAB_FILES_NAMES["vocab_file"]		)
        __a     				=  os.path.join(self.tmpdirname  ,						VOCAB_FILES_NAMES["merges_file"]		)
        with open(self.vocab_file  ,						"w"  ,						encoding="utf-8"		) as fp:
               fp.write(json.dumps(lowerCamelCase		) + "\n"		)
        with open(self.merges_file  ,						"w"  ,						encoding="utf-8"		) as fp:
               fp.write("\n".join(lowerCamelCase		)		)


 def 		a__ (				self  ,						**lowerCamelCase		):
        kwargs.update(self.special_tokens_map		)
        return BlenderbotSmallTokenizer.from_pretrained(self.tmpdirname  ,						**lowerCamelCase		)


 def 		a__ (				self  ,						lowerCamelCase		):
        __a     				=  "adapt act apte"
        __a     				=  "adapt act apte"
        return input_text, output_text


 def 		a__ (				self		):
        __a     				=  BlenderbotSmallTokenizer(self.vocab_file  ,						self.merges_file  ,						**self.special_tokens_map		)
        __a     				=  "adapt act apte"
        __a     				=  ["adapt", "act", "ap@@", "te"]
        __a     				=  tokenizer.tokenize(lowerCamelCase		)
        self.assertListEqual(lowerCamelCase  ,						lowerCamelCase		)

        __a     				=  [tokenizer.bos_token] + tokens + [tokenizer.eos_token]

        __a     				=  [0, 1, 2, 3, 4, 5]
        self.assertListEqual(tokenizer.convert_tokens_to_ids(lowerCamelCase		)  ,						lowerCamelCase		)


 def 		a__ (				self		):
        __a     				=  BlenderbotSmallTokenizer.from_pretrained("facebook/blenderbot-90M"		)
        assert tok("sam"		).input_ids == [1384]
        __a     				=  "I am a small frog."
        __a     				=  tok([src_text]  ,						padding=lowerCamelCase  ,						truncation=lowerCamelCase		)["input_ids"]
        __a     				=  tok.batch_decode(lowerCamelCase  ,						skip_special_tokens=lowerCamelCase  ,						clean_up_tokenization_spaces=lowerCamelCase		)[0]
        assert src_text != decoded  # I wish it did!
        assert decoded == "i am a small frog ."






 def 		a__ (				self		):
        __a     				=  BlenderbotSmallTokenizer.from_pretrained("facebook/blenderbot-90M"		)
        __a     				=  "I am a small frog ."
        __a     				=  "."
        __a     				=  tok(lowerCamelCase		)["input_ids"]
        __a     				=  tok(lowerCamelCase		)["input_ids"]

        assert encoded[-1] == encoded_dot[0]

"""simple docstring"""



import os



def 					_lowerCamelCase(					):
       with open(os.path.dirname(a							) + "/grid.txt"							) as f:
              __a     				=  []  # noqa: E741
              for _ in range(2_0							):
                     l.append([int(a							) for x in f.readline().split()]							)

              __a     				=  0

              # right
              for i in range(2_0							):
                     for j in range(1_7							):
                            __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(1_7							):
                     for j in range(2_0							):
                            __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(1_7							):
                     for j in range(1_7							):
                            __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(1_7							):
                     for j in range(3 ,  2_0							):
                            __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())
