



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			(		__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	)       ->       bool:



						'''simple docstring'''






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







def 				A			(		__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase							,					__UpperCAmelCase	)       ->       int:



						'''simple docstring'''






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







def 				A			(		__UpperCAmelCase	)       ->       int:



						'''simple docstring'''






						UpperCAmelCase_     							=     set()

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


if __name__ == "__main__":
							import doctest

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










from dataclasses import dataclass
from typing import Callable, Optional

import datasets







@dataclass
class 							a_  (		datasets.BuilderConfig				):
						UpperCamelCase__      :						Optional[Callable]				       =None
						UpperCamelCase__      :						Optional[dict]				       =None
						UpperCamelCase__      :						Optional[datasets.Features]				       =None

						def 	__a       (    self	:List[str])		->					List[str]:
												assert self.generator is not None, "generator must be specified"

												if self.gen_kwargs is None:
																		UpperCAmelCase_     							=     {}







class 							a_  (		datasets.GeneratorBasedBuilder				):
						UpperCamelCase__      :						List[str]				       =GeneratorConfig

						def 	__a       (    self	:List[str])		->					List[Any]:
												return datasets.DatasetInfo(features=self.config.features)

						def 	__a       (    self	:Optional[Any]   ,						_lowercase	:List[str])		->					Optional[Any]:
												return [datasets.SplitGenerator(name=datasets.Split.TRAIN   ,						gen_kwargs=self.config.gen_kwargs)]




						def 	__a       (    self	:Optional[int]   ,						**_lowercase	:str)		->					Union[str, Any]:
												for idx, ex in enumerate(self.config.generator(**_lowercase)):
																		yield idx, ex





