



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   UpperCAmelCase							(		A__				,  A__				,  A__				,  A__     )							->					List[Any]:
	return 0 <= row < rows and 0 <= col < cols
def   UpperCAmelCase							(		A__				,  A__				,  A__				,  A__     )							->					Dict:
	_snake_case					:							Union[str, Any]					     =   len(A__     )
	_snake_case					:							int					     =   len(mat[0]     )
	if is_safe(A__				,  A__				,  A__				,  A__     ) and (row, col) not in seen and mat[row][col] == 1:
		seen.add((row, col)     )
		return (
		    1
		    + depth_first_search(row + 1				,  A__				,  A__				,  A__     )
		    + depth_first_search(row - 1				,  A__				,  A__				,  A__     )
		    + depth_first_search(A__				,  col + 1				,  A__				,  A__     )
		    + depth_first_search(A__				,  col - 1				,  A__				,  A__     )
		)
	else:
		return 0
def   UpperCAmelCase							(		A__     )							->					List[Any]:
	_snake_case					:							set					     =   set()

	_snake_case					:							Dict					     =   0
	for row, line in enumerate(A__     ):
		for col, item in enumerate(A__     ):
			if item == 1 and (row, col) not in seen:
				# Maximizing the area
				_snake_case					:							Tuple					     =   max(A__				,  depth_first_search(A__				,  A__				,  A__				,  A__     )     )
	return max_area


if __name__ == "__main__":
						import doctest

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








"""simple docstring"""





def 							_lowerCAmelCase   (    UpperCAmelCase  :				int					):


					'''simple docstring'''






					if not isinstance(UpperCAmelCase   ,				UpperCAmelCase					):
										raise ValueError('''double_factorial() only accepts integral values'''					)
					if n < 0:
										raise ValueError('''double_factorial() not defined for negative values'''					)
					return 1 if n <= 1 else n * double_factorial(n - 2					)


if __name__ == "__main__":
				import doctest

				doctest.testmod()


