






"""simple docstring"""





UpperCamelCase			=      [
    [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
]






def     A(  snake_case_						,       snake_case_						,       snake_case_						,       snake_case_		):
       """simple docstring"""





       return 0 <= row < rows and 0 <= col < cols






def     A(  snake_case_						,       snake_case_						,       snake_case_						,       snake_case_		):
       """simple docstring"""





       lowercase__:    int        =      len(snake_case_		)
       lowercase__:    Dict        =      len(mat[0]		)
       if is_safe(snake_case_						,       snake_case_						,       snake_case_						,       snake_case_		) and (row, col) not in seen and mat[row][col] == 1:
              seen.add((row, col)		)
              return (
                  1
                  + depth_first_search(row + 1						,       snake_case_						,       snake_case_						,       snake_case_		)
                  + depth_first_search(row - 1						,       snake_case_						,       snake_case_						,       snake_case_		)
                  + depth_first_search(snake_case_						,       col + 1						,       snake_case_						,       snake_case_		)
                  + depth_first_search(snake_case_						,       col - 1						,       snake_case_						,       snake_case_		)
              )
       else:
              return 0






def     A(  snake_case_		):
       """simple docstring"""





       lowercase__:    set        =      set()

       lowercase__:    Optional[Any]        =      0
       for row, line in enumerate(snake_case_		):
              for col, item in enumerate(snake_case_		):
                     if item == 1 and (row, col) not in seen:
                            # Maximizing the area
                            lowercase__:    Optional[int]        =      max(snake_case_						,       depth_first_search(snake_case_						,       snake_case_						,       snake_case_						,       snake_case_		)		)
       return max_area


if __name__ == "__main__":
  import doctest

  print(find_max_area(matrix))  # Output -> 6
  doctest.testmod()














"""simple docstring"""





def     A(  snake_case_						,       snake_case_		):
       """simple docstring"""





       assert isinstance(snake_case_						,       snake_case_		), F"""The input value of [set_a={set_a}] is not a set"""
       assert isinstance(snake_case_						,       snake_case_		), F"""The input value of [set_b={set_b}] is not a set"""

       return {a + b for a in set_a for b in set_b}


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

  testmod()






