




"""simple docstring"""




import os



def     a__ (				)						->					Dict:
			with open(os.path.dirname(lowercase_				) + """/grid.txt"""				) as f:
						lowerCamelCase			      =					[]  # noqa: E741
						for _ in range(20				):
									l.append([int(lowercase_				) for x in f.readline().split()]				)

						lowerCamelCase			      =					0

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

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

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

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


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






def 						UpperCamelCase					(lowercase_: int = 10					)     ->      str:
	if not isinstance(lowercase_    ,      lowercase_					) or n < 0:
		raise ValueError("""Invalid input"""					)
	A__							:    List[str]        =		10**n
	A__							:    Any        =		28433 * (pow(2    ,      7830457    ,      lowercase_					)) + 1
	return str(number % modulus					)


if __name__ == "__main__":
	from doctest import testmod

	testmod()
	print(f'''{solution(10) = }''')



