





'''simple docstring'''







import unittest
from dataclasses import dataclass
from typing import Optional

from transformers.utils import ModelOutput





@dataclass
class     _UpperCAmelCase							(						lowerCAmelCase_   ):
		a   :   float
		a   :   Optional[float]     =None
		a   :   Optional[float]     =None





class     _UpperCAmelCase							(						unittest.TestCase   ):
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest(a=30			)
					self.assertEqual(x.a,30			)
					self.assertIsNone(x.b			)
					self.assertIsNone(x.c			)
					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								__lowerCAmelCase											=				x.d
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest(a=30,b=10			)
					self.assertEqual(x[0],30			)
					self.assertEqual(x[1],10			)
					self.assertEqual(x[:2],(30, 10)			)
					self.assertEqual(x[:],(30, 10)			)

					__lowerCAmelCase											=				ModelOutputTest(a=30,c=10			)
					self.assertEqual(x[0],30			)
					self.assertEqual(x[1],10			)
					self.assertEqual(x[:2],(30, 10)			)
					self.assertEqual(x[:],(30, 10)			)
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest(a=30,b=10			)
					self.assertEqual(x["""a"""],30			)
					self.assertEqual(x["""b"""],10			)
					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								__lowerCAmelCase											=				x["""c"""]

					__lowerCAmelCase											=				ModelOutputTest(a=30,c=10			)
					self.assertEqual(x["""a"""],30			)
					self.assertEqual(x["""c"""],10			)
					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								__lowerCAmelCase											=				x["""b"""]
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest(a=30			)
					self.assertEqual(list(x.keys()			),["""a"""]			)
					self.assertEqual(list(x.values()			),[30]			)
					self.assertEqual(list(x.items()			),[("""a""", 30)]			)
					self.assertEqual(list(__SCREAMING_SNAKE_CASE			),["""a"""]			)

					__lowerCAmelCase											=				ModelOutputTest(a=30,b=10			)
					self.assertEqual(list(x.keys()			),["""a""", """b"""]			)
					self.assertEqual(list(x.values()			),[30, 10]			)
					self.assertEqual(list(x.items()			),[("""a""", 30), ("""b""", 10)]			)
					self.assertEqual(list(__SCREAMING_SNAKE_CASE			),["""a""", """b"""]			)

					__lowerCAmelCase											=				ModelOutputTest(a=30,c=10			)
					self.assertEqual(list(x.keys()			),["""a""", """c"""]			)
					self.assertEqual(list(x.values()			),[30, 10]			)
					self.assertEqual(list(x.items()			),[("""a""", 30), ("""c""", 10)]			)
					self.assertEqual(list(__SCREAMING_SNAKE_CASE			),["""a""", """c"""]			)

					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								__lowerCAmelCase											=				x.update({"""d""": 20}			)
					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								del x["a"]
					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								__lowerCAmelCase											=				x.pop("""a"""			)
					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								__lowerCAmelCase											=				x.setdefault("""d""",32			)
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest(a=30			)
					__lowerCAmelCase											=				10
					self.assertEqual(x.a,10			)
					self.assertEqual(x["""a"""],10			)
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest(a=30			)
					__lowerCAmelCase											=				10
					self.assertEqual(x.a,10			)
					self.assertEqual(x["""a"""],10			)
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest({"""a""": 30, """b""": 10}			)
					self.assertEqual(list(x.keys()			),["""a""", """b"""]			)
					self.assertEqual(x.a,30			)
					self.assertEqual(x.b,10			)







		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				ModelOutputTest([("""a""", 30), ("""b""", 10)]			)
					self.assertEqual(list(x.keys()			),["""a""", """b"""]			)
					self.assertEqual(x.a,30			)
					self.assertEqual(x.b,10			)

					with self.assertRaises(__SCREAMING_SNAKE_CASE			):
								__lowerCAmelCase											=				ModelOutputTest([("""a""", 30), (10, 10)]			)

					__lowerCAmelCase											=				ModelOutputTest(a=(30, 30)			)
					self.assertEqual(list(x.keys()			),["""a"""]			)
					self.assertEqual(x.a,(30, 30)			)








'''simple docstring'''







def    _lowerCAmelCase						(						lowercase	)					->					int:
			__lowerCAmelCase											=				len(lowercase	)
			__lowerCAmelCase											=				[0] * length
			__lowerCAmelCase											=				[[False for i in range(lowercase	)] for j in range(lowercase	)]
			for i, c in enumerate(lowercase	):
						__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(lowercase					,	0 if j == 0 else (cut[j - 1] + 1)	)
						__lowerCAmelCase											=				mincut
			return cut[length - 1]


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

