





"""simple docstring"""





import os


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str     ):







      '''simple docstring'''




      lowerCAmelCase    		=			len(grid[0]     )
      lowerCAmelCase    		=			len(SCREAMING_SNAKE_CASE     )

      lowerCAmelCase    		=			0
      lowerCAmelCase    		=			0
      lowerCAmelCase    		=			0

      # Check vertically, horizontally, diagonally at the same time (only works
      # for nxn grid)
      for i in range(SCREAMING_SNAKE_CASE     ):
            for j in range(n_rows - 3     ):
                  lowerCAmelCase    		=			grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
                  lowerCAmelCase    		=			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:
                        lowerCAmelCase    		=			(
                            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:
                        lowerCAmelCase    		=			(
                            grid[i][j]
                            * grid[i - 1][j + 1]
                            * grid[i - 2][j + 2]
                            * grid[i - 3][j + 3]
                        )

                  lowerCAmelCase    		=			max(
                      SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )
                  if max_product > largest:
                        lowerCAmelCase    		=			max_product

      return largest


def      UpperCAmelCase__				(    ):







      '''simple docstring'''




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

      lowerCAmelCase    		=			[[int(SCREAMING_SNAKE_CASE     ) for i in grid[j]] for j in range(len(SCREAMING_SNAKE_CASE     )     )]

      return largest_product(SCREAMING_SNAKE_CASE     )


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













"""simple docstring"""





import secrets
from random import shuffle
from string import ascii_letters, ascii_lowercase, ascii_uppercase, digits, punctuation


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		int = 8     ):







      '''simple docstring'''




      lowerCAmelCase    		=			ascii_letters + digits + punctuation
      return "".join(secrets.choice(SCREAMING_SNAKE_CASE     ) for _ in range(SCREAMING_SNAKE_CASE     )     )


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      i -= len(SCREAMING_SNAKE_CASE     )
      lowerCAmelCase    		=			i // 3
      lowerCAmelCase    		=			i % 3
      # chars = chars_incl + random_letters(ascii_letters, i / 3 + remainder) +
      #     random_number(digits, i / 3) + random_characters(punctuation, i / 3)
      lowerCAmelCase    		=			(
          chars_incl
          + random(SCREAMING_SNAKE_CASE				,		quotient + remainder     )
          + random(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )
          + random(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )
      )
      lowerCAmelCase    		=			list(SCREAMING_SNAKE_CASE     )
      shuffle(SCREAMING_SNAKE_CASE     )
      return "".join(SCREAMING_SNAKE_CASE     )

      # random is a generalised function for letters, characters and numbers


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      return "".join(secrets.choice(SCREAMING_SNAKE_CASE     ) for _ in range(SCREAMING_SNAKE_CASE     )     )


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		List[Any]				,		SCREAMING_SNAKE_CASE	:		List[Any]     ):







      '''simple docstring'''




      pass  # Put your code here...


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		List[Any]				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      pass  # Put your code here...


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		Optional[Any]				,		SCREAMING_SNAKE_CASE	:		Dict     ):







      '''simple docstring'''




      pass  # Put your code here...


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		str				,		SCREAMING_SNAKE_CASE	:		int = 8     ):







      '''simple docstring'''




      if len(SCREAMING_SNAKE_CASE     ) < min_length:
            # Your Password must be at least 8 characters long
            return False

      lowerCAmelCase    		=			any(char in ascii_uppercase for char in password     )
      lowerCAmelCase    		=			any(char in ascii_lowercase for char in password     )
      lowerCAmelCase    		=			any(char in digits for char in password     )
      lowerCAmelCase    		=			any(char in punctuation for char in password     )

      return upper and lower and num and spec_char
      # Passwords should contain UPPERCASE, lowerase
      # numbers, and special characters


def      UpperCAmelCase__				(    ):







      '''simple docstring'''




      lowerCAmelCase    		=			int(input("""Please indicate the max length of your password: """     ).strip()     )
      lowerCAmelCase    		=			input(
          """Please indicate the characters that must be in your password: """     ).strip()
      print("""Password generated:"""				,		password_generator(SCREAMING_SNAKE_CASE     )     )
      print(
          """Alternative Password generated:"""				,		alternative_password_generator(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )				,		)
      print("""[If you are thinking of using this passsword, You better save it.]"""     )


if __name__ == "__main__":
       main()






