



import os


def A						(       )						->      Any:
			with open(os.path.dirname(__UpperCamelCase					) + '/grid.txt'					) as f:
						A__       =    []  # noqa: E741
						for _ in range(20					):
									l.append([int(__UpperCamelCase					) 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())









import unittest

from transformers import is_flax_available
from transformers.testing_utils import require_flax, require_sentencepiece, require_tokenizers, require_torch, slow


if is_flax_available():
							import optax
							from flax.training.common_utils import onehot

							from transformers import AutoTokenizer, FlaxMTaForConditionalGeneration
							from transformers.models.ta.modeling_flax_ta import shift_tokens_right


@require_torch
@require_sentencepiece
@require_tokenizers
@require_flax
class      __lowerCAmelCase     (		unittest.TestCase      ):
					"""simple docstring"""






					@slow
					def     _a							(     self					:       int					):






								"""simple docstring"""


								A__       =    FlaxMTaForConditionalGeneration.from_pretrained('google/mt5-small'					)
								A__       =    AutoTokenizer.from_pretrained('google/mt5-small'					)

								A__       =    tokenizer('Hello there'				,					return_tensors='np'					).input_ids
								A__       =    tokenizer('Hi I am'				,					return_tensors='np'					).input_ids

								A__       =    shift_tokens_right(_snake_case				,					model.config.pad_token_id				,					model.config.decoder_start_token_id					)

								A__       =    model(_snake_case				,					decoder_input_ids=_snake_case					).logits
								A__       =    optax.softmax_cross_entropy(_snake_case				,					onehot(_snake_case				,					logits.shape[-1]					)					).mean()

								A__       =    -(labels.shape[-1] * loss.item())

								A__       =    -84.9127
								self.assertTrue(abs(mtf_score - EXPECTED_SCORE					) < 1E-4					)




