

import importlib.metadata
import subprocess
import sys





def  _snake_case		(snake_case_					:     bool = False  )							->		List[str]:
  __UpperCAmelCase	:  Dict		=     False
  if "IPython" in sys.modules:
    __UpperCAmelCase	:  Tuple		=     'google.colab' in str(sys.modules['IPython'].get_ipython()  )

  if in_colab:
    if upgrade:
      __UpperCAmelCase	:  Union[str, Any]		=     ['pip', 'install', '-U', 'torch']
      subprocess.run(snake_case_    ,       check=snake_case_  )
    # get the current version of torch
    __UpperCAmelCase	:  List[str]		=     importlib.metadata.version('torch'  )
    __UpperCAmelCase	:  Tuple		=     torch_version[: torch_version.rindex('.'  )]
    __UpperCAmelCase	:  int		=     F"https://storage.googleapis.com/tpu-pytorch/wheels/colab/torch_xla-{torch_version_trunc}-cp37-cp37m-linux_x86_64.whl"
    __UpperCAmelCase	:  List[Any]		=     ['pip', 'install', xla_wheel]
    subprocess.run(snake_case_    ,       check=snake_case_  )
  else:
    raise RuntimeError('`install_xla` utility works only on google colab.'  )






def  UpperCAmelCase__(    lowerCamelCase_	):



			"""simple docstring"""





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


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

