"""simple docstring"""



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCamelCase         =		{
    "configuration_fsmt": ["FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP", "FSMTConfig"],
    "tokenization_fsmt": ["FSMTTokenizer"],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_UpperCamelCase         =		["FSMTForConditionalGeneration", "FSMTModel", "PretrainedFSMTModel"]


if TYPE_CHECKING:
				from .configuration_fsmt import FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP, FSMTConfig
				from .tokenization_fsmt import FSMTTokenizer

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_fsmt import FSMTForConditionalGeneration, FSMTModel, PretrainedFSMTModel

else:
				import sys

				_UpperCamelCase         =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






"""simple docstring"""



def    _A(		lowerCAmelCase       ):
							A__					:    str														= len(lowerCAmelCase       )
							A__					:    List[Any]														= [0] * length
							A__					:    Union[str, Any]														= [[False for i in range(lowerCAmelCase       )] for j in range(lowerCAmelCase       )]
							for i, c in enumerate(lowerCAmelCase       ):
														A__					:    Dict														= i
														for j in range(i + 1       ):
																					if c == string[j] and (i - j < 2 or is_palindromic[j + 1][i - 1]):
																												A__					:    List[str]														= True
																												A__					:    Optional[Any]														= min(lowerCAmelCase ,     0 if j == 0 else (cut[j - 1] + 1)       )
														A__					:    Optional[int]														= mincut
							return cut[length - 1]


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





