



def 		UpperCamelCase	(   snake_case__       :    int       ,     snake_case__       :    int	)	->     int:
   while b:
      UpperCamelCase	,     UpperCamelCase    :  Optional[Any]							=	b, a % b
   return a
def 		UpperCamelCase	(   snake_case__       :    int       ,     snake_case__       :    int	)	->     int:
   return a if b == 0 else euclidean_gcd_recursive(snake_case__       ,     a % b	)
def 		UpperCamelCase	(   )	->     str:
   print(F"""euclidean_gcd(3, 5) = {euclidean_gcd(3       ,     5	)}"""	)
   print(F"""euclidean_gcd(5, 3) = {euclidean_gcd(5       ,     3	)}"""	)
   print(F"""euclidean_gcd(1, 3) = {euclidean_gcd(1       ,     3	)}"""	)
   print(F"""euclidean_gcd(3, 6) = {euclidean_gcd(3       ,     6	)}"""	)
   print(F"""euclidean_gcd(6, 3) = {euclidean_gcd(6       ,     3	)}"""	)

   print(F"""euclidean_gcd_recursive(3, 5) = {euclidean_gcd_recursive(3       ,     5	)}"""	)
   print(F"""euclidean_gcd_recursive(5, 3) = {euclidean_gcd_recursive(5       ,     3	)}"""	)
   print(F"""euclidean_gcd_recursive(1, 3) = {euclidean_gcd_recursive(1       ,     3	)}"""	)
   print(F"""euclidean_gcd_recursive(3, 6) = {euclidean_gcd_recursive(3       ,     6	)}"""	)
   print(F"""euclidean_gcd_recursive(6, 3) = {euclidean_gcd_recursive(6       ,     3	)}"""	)


if __name__ == "__main__":
    main()








import functools
from typing import Any
def 		UpperCamelCase	(   snake_case__       :    str       ,     snake_case__       :    list[str]	)	->     bool:

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

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

   # Build trie
   UpperCamelCase    :  dict[str, Any]							=	{}
   UpperCamelCase    :  List[str]							=	'WORD_KEEPER'

   for word in words:
      UpperCamelCase    :  List[str]							=	trie
      for c in word:
         if c not in trie_node:
            UpperCamelCase    :  int							=	{}

         UpperCamelCase    :  str							=	trie_node[c]

      UpperCamelCase    :  Tuple							=	True

   UpperCamelCase    :  List[Any]							=	len(snake_case__	)

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

      UpperCamelCase    :  Dict							=	trie
      for i in range(snake_case__       ,     snake_case__	):
         UpperCamelCase    :  List[Any]							=	trie_node.get(string[i]       ,     snake_case__	)

         if trie_node is None:
            return False

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

      return False

   return is_breakable(0	)


if __name__ == "__main__":
    import doctest

    doctest.testmod()



