



"""simple docstring"""







import functools
from typing import Any

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str    ,   lowerCAmelCase__      :				list[str]						)						->   bool:

  """simple docstring"""




  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
  lowerCAmelCase_   :				dict[str, Any]								= {}
  lowerCAmelCase_   :				Optional[int]								= 'WORD_KEEPER'

  for word in words:
    lowerCAmelCase_   :				Tuple								= trie
    for c in word:
      if c not in trie_node:
        lowerCAmelCase_   :				Union[str, Any]								= {}

      lowerCAmelCase_   :				Any								= trie_node[c]

    lowerCAmelCase_   :				int								= True

  lowerCAmelCase_   :				Dict								= len(lowerCAmelCase__						)

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

    lowerCAmelCase_   :				str								= trie
    for i in range(lowerCAmelCase__    ,   lowerCAmelCase__						):
      lowerCAmelCase_   :				Union[str, Any]								= 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"""







from __future__ import annotations

def 				UpperCamelCase_    (    lowerCAmelCase__      :				list[int]    ,   lowerCAmelCase__      :				int						)						->   bool:

  """simple docstring"""




  if len(lowerCAmelCase__						) == 0:
    return False
  lowerCAmelCase_   :				Union[str, Any]								= len(lowerCAmelCase__						) // 2
  if a_list[midpoint] == item:
    return True
  if item < a_list[midpoint]:
    return binary_search(a_list[:midpoint]    ,   lowerCAmelCase__						)
  else:
    return binary_search(a_list[midpoint + 1 :]    ,   lowerCAmelCase__						)


if __name__ == "__main__":
     lowercase__		:				str          =	input("""Enter numbers separated by comma:\n""").strip()
     lowercase__		:				Optional[int]          =	[int(item.strip()) for item in user_input.split(""",""")]
     lowercase__		:				Optional[Any]          =	int(input("""Enter the number to be found in the list:\n""").strip())
     lowercase__		:				int          =	"""""" if binary_search(sequence, target) else """not """
     print(f'{target} was {not_str}found in {sequence}')





