




def 			__magic_name__				( A		:					int   ):






			'''simple docstring'''







			if bit_count < 0:
						raise ValueError("The given input must be positive"   )

			# get the generated string sequence
			a    =			gray_code_sequence_string(A   )
			#
			# convert them to integers
			for i in range(len(A   )   ):
						a    =			int(sequence[i],  2   )

			return sequence




def 			__magic_name__				( A		:					int   ):






			'''simple docstring'''







			if bit_count == 0:
						return ["0"]

			if bit_count == 1:
						return ["0", "1"]

			a    =			1 << bit_count  # defines the length of the sequence
			# 1<< n is equivalent to 2^n

			# recursive answer will generate answer for n-1 bits
			a    =			gray_code_sequence_string(bit_count - 1   )

			a    =			[]

			# append 0 to first half of the smaller sequence generated
			for i in range(seq_len // 2   ):
						a    =			"0" + smaller_sequence[i]
						sequence.append(A   )

			# append 1 to second half ... start from the end of the list
			for i in reversed(range(seq_len // 2   )   ):
						a    =			"1" + smaller_sequence[i]
						sequence.append(A   )

			return sequence


if __name__ == "__main__":
		import doctest

		doctest.testmod()














"""simple docstring"""





import os







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




