'''simple docstring'''





def     __lowerCAmelCase						(       a_		)      ->	int:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			str    	=       abs(a_		)
     SCREAMING_SNAKE_CASE					:			Any    	=       0
     while n > 0:
          res += n % 10
          n //= 10
     return res


def     __lowerCAmelCase						(       a_		)      ->	int:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Optional[int]    	=       abs(a_		)
     return n if n < 10 else n % 10 + sum_of_digits(n // 10		)


def     __lowerCAmelCase						(       a_		)      ->	int:





     '''simple docstring'''





     return sum(int(a_		) for c in str(abs(a_		)		)		)


def     __lowerCAmelCase						(       )      ->	None:





     '''simple docstring'''





     from collections.abc import Callable
     from timeit import timeit

     def benchmark_a_function(a_       ,      a_		) -> None:
          SCREAMING_SNAKE_CASE					:			Optional[int]    	=       f"""{func.__name__}({value})"""
          SCREAMING_SNAKE_CASE					:			Tuple    	=       timeit(f"""__main__.{call}"""       ,      setup='import __main__'		)
          print(f"""{call:56} = {func(a_		)} -- {timing:.4f} seconds"""		)

     for value in (26_2144, 1125_8999_0684_2624, 126_7650_6002_2822_9401_4967_0320_5376):
          for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
               benchmark_a_function(a_       ,      a_		)
          print()


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 benchmark()




'''simple docstring'''





from __future__ import annotations


def     __lowerCAmelCase						(       a_       ,      a_ = None		)      ->	list[list[str]]:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Optional[int]    	=       word_bank or []
     # create a table
     SCREAMING_SNAKE_CASE					:			int    	=       len(a_		) + 1

     SCREAMING_SNAKE_CASE					:			list[list[list[str]]]    	=       []
     for _ in range(a_		):
          table.append([]		)
     # seed value
     SCREAMING_SNAKE_CASE					:			List[Any]    	=       [[]]  # because empty string has empty combination

     # iterate through the indices
     for i in range(a_		):
          # condition
          if table[i] != []:
               for word in word_bank:
                    # slice condition
                    if target[i : i + len(a_		)] == word:
                         SCREAMING_SNAKE_CASE					:			list[list[str]]    	=       [
                             [word, *way] for way in table[i]
                         ]
                         # adds the word to every combination the current position holds
                         # now,push that combination to the table[i+len(word)]
                         table[i + len(a_		)] += new_combinations

    # combinations are in reverse order so reverse for better output
     for combination in table[len(a_		)]:
          combination.reverse()

     return table[len(a_		)]


if __name__ == "__main__":
 print(all_construct("""jwajalapa""", ["""jwa""", """j""", """w""", """a""", """la""", """lapa"""]))
 print(all_construct("""rajamati""", ["""s""", """raj""", """amat""", """raja""", """ma""", """i""", """t"""]))
 print(
     all_construct(
         """hexagonosaurus""",
         ["""h""", """ex""", """hex""", """ag""", """ago""", """ru""", """auru""", """rus""", """go""", """no""", """o""", """s"""],
     )
 )



