



'''simple docstring'''


lowercase											=      [
    [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_							(		lowercase__							,						lowercase__							,						lowercase__							,						lowercase__							):


     '''simple docstring'''







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






def 			UpperCAmelCase_							(		lowercase__							,						lowercase__							,						lowercase__							,						lowercase__							):


     '''simple docstring'''







     a_									=len(__A							)
     a_									=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_							(		lowercase__							):


     '''simple docstring'''







     a_									=set()

     a_									=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
                    a_									=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'''







import itertools







def _UpperCamelCase			(	__A = 1000000       )				->						int:


      '''simple docstring'''



      UpperCamelCase__      =							[1]

      for i in itertools.count(len(__A       )       ):
            UpperCamelCase__      =							0
            for j in itertools.count(1       ):
                  UpperCamelCase__      =							-1 if j % 2 == 0 else +1
                  UpperCamelCase__      =							(j * j * 3 - j) // 2
                  if index > i:
                        break
                  item += partitions[i - index] * sign
                  item %= number
                  index += j
                  if index > i:
                        break
                  item += partitions[i - index] * sign
                  item %= number

            if item == 0:
                  return i
            partitions.append(__A       )

      return 0


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  print(F"""{solution() = }""")





