





"""simple docstring"""





import functools
from typing import Any


def       a__					(					_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE    ):




		"""simple docstring"""


		if not isinstance(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE    ) or len(_SCREAMING_SNAKE_CASE    ) == 0:
				raise ValueError("the string should be not empty string"    )

		if not isinstance(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE    ) or not all(
		    isinstance(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE    ) and len(_SCREAMING_SNAKE_CASE    ) > 0 for item in words    ):
				raise ValueError("the words should be a list of non-empty strings"    )

		# Build trie
		UpperCamelCase   =	{}
		UpperCamelCase   =	"WORD_KEEPER"

		for word in words:
				UpperCamelCase   =	trie
				for c in word:
						if c not in trie_node:
								UpperCamelCase   =	{}

						UpperCamelCase   =	trie_node[c]

				UpperCamelCase   =	True

		UpperCamelCase   =	len(_SCREAMING_SNAKE_CASE    )

		# Dynamic programming method
		@functools.cache
		def is_breakable(_SCREAMING_SNAKE_CASE    ) -> bool:
				if index == len_string:
						return True

				UpperCamelCase   =	trie
				for i in range(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE    ):
						UpperCamelCase   =	trie_node.get(string[i]  ,	_SCREAMING_SNAKE_CASE    )

						if trie_node is None:
								return False

						if trie_node.get(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE    ) and is_breakable(i + 1    ):
								return True

				return False

		return is_breakable(0    )


if __name__ == "__main__":
						import doctest

						doctest.testmod()













"""simple docstring"""





lowerCAmelCase__     			=			'''
# Transformers installation
! pip install transformers datasets
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/transformers.git
'''

lowerCAmelCase__     			=			[{'''type''': '''code''', '''content''': INSTALL_CONTENT}]
lowerCAmelCase__     			=			{
    '''{processor_class}''': '''FakeProcessorClass''',
    '''{model_class}''': '''FakeModelClass''',
    '''{object_class}''': '''FakeObjectClass''',
}






