


'''simple docstring'''

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


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





'''simple docstring'''

from __future__ import annotations

import random
from collections.abc import Iterable
from typing import Any, Generic, TypeVar

_UpperCAmelCase					:			Any				     =					TypeVar("""T""", bound=bool)


class    a__					(			Generic[T]   ):







				"""simple docstring"""



				def __init__(self							,      __lowercase		):
										__lowerCAmelCase											=					value
										__lowerCAmelCase											=					None
										__lowerCAmelCase											=					None




				@property
				def        _snake_case	(self		):
										return self._value




				@staticmethod
				def        _snake_case	(__lowercase							,      __lowercase		):
										if not roota:
																return roota

										if not roota:
																return roota

										if roota.value > roota.value:
																__lowerCAmelCase							,       __lowerCAmelCase											=					roota, roota

										if random.choice([True, False]		):
																__lowerCAmelCase							,       __lowerCAmelCase											=					roota.right, roota.left

										__lowerCAmelCase											=					RandomizedHeapNode.merge(roota.left							,      __lowercase		)

										return roota


class    a__					(			Generic[T]   ):







				"""simple docstring"""



				def __init__(self							,      __lowercase = ()		):
										__lowerCAmelCase											=					None

										if data:
																for item in data:
																						self.insert(__lowercase		)




				def        _snake_case	(self							,      __lowercase		):
										__lowerCAmelCase											=					RandomizedHeapNode.merge(self._root							,      RandomizedHeapNode(__lowercase		)		)




				def        _snake_case	(self		):
										__lowerCAmelCase											=					self.top()

										if self._root is None:
																return None

										__lowerCAmelCase											=					RandomizedHeapNode.merge(self._root.left							,      self._root.right		)

										return result




				def        _snake_case	(self		):
										if not self._root:
																raise IndexError('''Can\'t get top element for the empty heap.'''		)
										return self._root.value




				def        _snake_case	(self		):
										__lowerCAmelCase											=					None




				def        _snake_case	(self		):
										__lowerCAmelCase											=					[]
										while self:
																result.append(self.pop()		)

										return result




				def __bool__(self		):
										return self._root is not None


if __name__ == "__main__":
	import doctest

	doctest.testmod()

