


import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig


_A							     =       logging.get_logger(__name__)

class 			lowerCamelCase_					(    _SCREAMING_SNAKE_CASE    ):
							_lowerCamelCase				: Optional[Any]       =					"""speech-encoder-decoder"""
							_lowerCamelCase				: List[str]       =					True





							def __init__(							self			,       **_SCREAMING_SNAKE_CASE    ):
								super().__init__(**_SCREAMING_SNAKE_CASE    )
								if "encoder" not in kwargs or "decoder" not in kwargs:
									raise ValueError(
									    f"""A configuraton of type {self.model_type} cannot be instantiated because not both `encoder` and"""
									    f""" `decoder` sub-configurations are passed, but only {kwargs}"""    )

								a_     			=   kwargs.pop("""encoder"""    )
								a_     			=   encoder_config.pop("""model_type"""    )
								a_     			=   kwargs.pop("""decoder"""    )
								a_     			=   decoder_config.pop("""model_type"""    )

								a_     			=   AutoConfig.for_model(_SCREAMING_SNAKE_CASE			,       **_SCREAMING_SNAKE_CASE    )
								a_     			=   AutoConfig.for_model(_SCREAMING_SNAKE_CASE			,       **_SCREAMING_SNAKE_CASE    )
								a_     			=   True





							@classmethod
							def   __magic_name__      (							cls			,       _SCREAMING_SNAKE_CASE			,       _SCREAMING_SNAKE_CASE			,       **_SCREAMING_SNAKE_CASE    ):
								logger.info("""Setting `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"""    )
								a_     			=   True
								a_     			=   True

								return cls(encoder=encoder_config.to_dict()			,       decoder=decoder_config.to_dict()			,       **_SCREAMING_SNAKE_CASE    )





							def   __magic_name__      (							self    ):
								a_     			=   copy.deepcopy(self.__dict__    )
								a_     			=   self.encoder.to_dict()
								a_     			=   self.decoder.to_dict()
								a_     			=   self.__class__.model_type
								return output



def 			__SCREAMING_SNAKE_CASE		(		UpperCamelCase		:      str	)     ->	int:



	"""simple docstring"""






	a_     			=   len(UpperCamelCase	)
	a_     			=   [0] * length
	a_     			=   [[False for i in range(UpperCamelCase	)] for j in range(UpperCamelCase	)]
	for i, c in enumerate(UpperCamelCase	):
		a_     			=   i
		for j in range(i + 1	):
			if c == string[j] and (i - j < 2 or is_palindromic[j + 1][i - 1]):
				a_     			=   True
				a_     			=   min(UpperCamelCase     ,					0 if j == 0 else (cut[j - 1] + 1)	)
		a_     			=   mincut
	return cut[length - 1]


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