


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


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








def 	_UpperCamelCase							(				lowercase__				):
						barcode //= 10  # exclude the last digit
						__SCREAMING_SNAKE_CASE						:					Optional[Any]		      =		False
						__SCREAMING_SNAKE_CASE						:					Dict		      =		0

						# extract and check each digit
						while barcode != 0:
												__SCREAMING_SNAKE_CASE						:					int		      =		1 if checker else 3
												s += mult * (barcode % 10)
												barcode //= 10
												__SCREAMING_SNAKE_CASE						:					Dict		      =		not checker

						return (10 - (s % 10)) % 10


def 	_UpperCamelCase							(				lowercase__				):
						return len(str(lowercase__				)				) == 13 and get_check_digit(lowercase__				) == barcode % 10


def 	_UpperCamelCase							(				lowercase__				):
						if str(lowercase__				).isalpha():
												__SCREAMING_SNAKE_CASE						:					str		      =		F'''Barcode \'{barcode}\' has alphabetic characters.'''
												raise ValueError(lowercase__				)
						elif int(lowercase__				) < 0:
												raise ValueError('''The entered barcode has a negative value. Try again.'''				)
						else:
												return int(lowercase__				)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						__lowerCAmelCase     :			Union[str, Any]      =get_barcode(input('Barcode: ').strip())

						if is_valid(barcode):
												print(f"""'{barcode}' is a valid barcode.""")
						else:
												print(f"""'{barcode}' is NOT a valid barcode.""")
