




'''simple docstring'''





import os
import time

import pytest

from datasets.utils.filelock import FileLock, Timeout


def      UpperCamelCase_(	snake_case							:       Tuple     ):

							'''simple docstring'''






							snake_case_						=      FileLock(str(tmpdir / "foo.lock"     )     )
							snake_case_						=      FileLock(str(tmpdir / "foo.lock"     )     )
							snake_case_						=      0.01
							with locka.acquire():
														with pytest.raises(snake_case     ):
																					snake_case_						=      time.time()
																					locka.acquire(snake_case     )
																					assert time.time() - _start > timeout




def      UpperCamelCase_(	snake_case							:       str     ):

							'''simple docstring'''






							snake_case_						=      "a" * 1_0_0_0 + ".lock"
							snake_case_						=      FileLock(str(tmpdir / filename     )     )
							assert locka._lock_file.endswith(".lock"     )
							assert not locka._lock_file.endswith(snake_case     )
							assert len(os.path.basename(locka._lock_file     )     ) <= 2_5_5
							snake_case_						=      FileLock(tmpdir / filename     )
							with locka.acquire():
														with pytest.raises(snake_case     ):
																					locka.acquire(0     )












"""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())




