






import functools
from typing import Any





def  _lowerCamelCase						(						__lowerCamelCase ,							__lowerCamelCase       ) ->			bool:

     '''simple docstring'''

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

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

     # Build trie
     UpperCAmelCase__      :  dict[str, Any]				      =			{}
     UpperCAmelCase__      :  Tuple				      =			"""WORD_KEEPER"""

     for word in words:
          UpperCAmelCase__      :  Optional[Any]				      =			trie
          for c in word:
               if c not in trie_node:
                    UpperCAmelCase__      :  str				      =			{}

               UpperCAmelCase__      :  Dict				      =			trie_node[c]

          UpperCAmelCase__      :  Any				      =			True

     UpperCAmelCase__      :  Any				      =			len(__lowerCamelCase       )

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

          UpperCAmelCase__      :  str				      =			trie
          for i in range(__lowerCamelCase ,							__lowerCamelCase       ):
               UpperCAmelCase__      :  int				      =			trie_node.get(string[i] ,							__lowerCamelCase       )

               if trie_node is None:
                    return False

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

          return False

     return is_breakable(0       )


if __name__ == "__main__":
      import doctest

      doctest.testmod()








'''simple docstring'''
import re






def      UpperCamelCase_				(      A__						):
	a_      				=						re.compile(r"""^(\+91[\-\s]?)?[0]?(91)?[789]\d{9}$"""						)
	if match := re.search(A__  ,      A__						):
		return match.string == phone
	return False


if __name__ == "__main__":
		print(indian_phone_validator('+918827897895'))
