
"""simple docstring"""


def      lowerCAmelCase_     (	snake_case_	:    list[list[int]]    )     ->bool:

			'''simple docstring'''





			lowerCamelCase__			:  str  =[list(snake_case_    ) for row in matrix]
			if matrix and isinstance(snake_case_							,					snake_case_    ):
						if isinstance(matrix[0]							,					snake_case_    ):
									lowerCamelCase__			:  List[str]  =0
									for row in matrix:
												if prev_len == 0:
															lowerCamelCase__			:  Tuple  =len(snake_case_    )
															lowerCamelCase__			:  List[str]  =True
												else:
															lowerCamelCase__			:  Optional[int]  =prev_len == len(snake_case_    )
						else:
									lowerCamelCase__			:  Optional[int]  =True
			else:
						lowerCamelCase__			:  Dict  =False

			return result






def      lowerCAmelCase_     (	snake_case_	:    list[list[int]]    )     ->None:

			'''simple docstring'''





			if check_matrix(snake_case_    ) and len(snake_case_    ) > 0:
						lowerCamelCase__			:  Union[str, Any]  =[list(snake_case_    ) for row in a]
						lowerCamelCase__			:  int  =len(snake_case_    )
						if isinstance(a[0]							,					snake_case_    ):
									lowerCamelCase__			:  Any  =len(a[0]    )
						else:
									for dat in a:
												print(snake_case_    )
									return

						# horizotal printing increasing
						for i in range(0							,					snake_case_    ):
									print(a[0][i]    )
						# vertical printing down
						for i in range(1							,					snake_case_    ):
									print(a[i][mat_col - 1]    )
						# horizotal printing decreasing
						if mat_row > 1:
									for i in range(mat_col - 2							,					-1							,					-1    ):
												print(a[mat_row - 1][i]    )
        # vertical printing up
						for i in range(mat_row - 2							,					0							,					-1    ):
									print(a[i][0]    )
						lowerCamelCase__			:  Any  =[row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
						if len(snake_case_    ) > 0:
									spiral_print_clockwise(snake_case_    )
						else:
									return
			else:
						print('Not a valid matrix'    )
						return






def      lowerCAmelCase_     (	snake_case_	:    list[list]    )     ->list[int]:

			'''simple docstring'''





			if matrix:
						return list(matrix.pop(0    )    ) + spiral_traversal(list(zip(*snake_case_    )    )[::-1]    )
			else:
						return []


# driver code
if __name__ == "__main__":
							import doctest

							doctest.testmod()

							lowerCAmelCase			=		[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
							spiral_print_clockwise(a)

"""simple docstring"""


def      lowerCAmelCase_     (	snake_case_	:    str    )     ->int:
			lowerCamelCase__			:  Optional[Any]  =len(snake_case_    )
			lowerCamelCase__			:  Any  =[0] * length
			lowerCamelCase__			:  str  =[[False for i in range(snake_case_    )] for j in range(snake_case_    )]
			for i, c in enumerate(snake_case_    ):
						lowerCamelCase__			:  Optional[Any]  =i
						for j in range(i + 1    ):
									if c == string[j] and (i - j < 2 or is_palindromic[j + 1][i - 1]):
												lowerCamelCase__			:  int  =True
												lowerCamelCase__			:  Tuple  =min(snake_case_							,					0 if j == 0 else (cut[j - 1] + 1)    )
						lowerCamelCase__			:  Any  =mincut
			return cut[length - 1]


if __name__ == "__main__":
							lowerCAmelCase			=		input("""Enter the string: """).strip()
							lowerCAmelCase			=		find_minimum_partitions(s)
							print(f"""Minimum number of partitions required for the '{s}' is {ans}""")