
'''simple docstring'''

import os






def 	_snake_case						(      A_       :    List[str]   ):
  """simple docstring"""







  a_      :	Union[str, Any]      =							len(grid[0]   )
  a_      :	List[str]      =							len(A_   )

  a_      :	Optional[Any]      =							0
  a_      :	List[Any]      =							0
  a_      :	Union[str, Any]      =							0

  # Check vertically, horizontally, diagonally at the same time (only works
  # for nxn grid)
  for i in range(A_   ):
    for j in range(n_rows - 3   ):
      a_      :	str      =							grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
      a_      :	Optional[int]      =							grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

      # Left-to-right diagonal (\) product
      if i < n_columns - 3:
        a_      :	List[str]      =							(
            grid[i][j]
            * grid[i + 1][j + 1]
            * grid[i + 2][j + 2]
            * grid[i + 3][j + 3]
        )

      # Right-to-left diagonal(/) product
      if i > 2:
        a_      :	Tuple      =							(
            grid[i][j]
            * grid[i - 1][j + 1]
            * grid[i - 2][j + 2]
            * grid[i - 3][j + 3]
        )

      a_      :	List[Any]      =							max(
          A_     ,		A_     ,		A_     ,		A_   )
      if max_product > largest:
        a_      :	Union[str, Any]      =							max_product

  return largest






def 	_snake_case						(      ):
  """simple docstring"""







  a_      :	List[Any]      =							[]
  with open(os.path.dirname(A_   ) + """/grid.txt"""   ) as file:
    for line in file:
      grid.append(line.strip("""\n"""   ).split(""" """   )   )

  a_      :	int      =							[[int(A_   ) for i in grid[j]] for j in range(len(A_   )   )]

  return largest_product(A_   )


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




'''simple docstring'''

from torch import nn






def 	_snake_case						(      A_       :    Dict   ):
  """simple docstring"""







  if act_fn in ["swish", "silu"]:
    return nn.SiLU()
  elif act_fn == "mish":
    return nn.Mish()
  elif act_fn == "gelu":
    return nn.GELU()
  else:
    raise ValueError(f'''Unsupported activation function: {act_fn}'''   )


