


"""simple docstring"""



from __future__ import annotations







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


    """simple docstring"""





    snake_case    :      int      					=    word_bank or []
    # create a table
    snake_case    :      int      					=    len(lowercase ) + 1

    snake_case    :      list[list[list[str]]]      					=    []
    for _ in range(lowercase ):
        table.append([] )
    # seed value
    snake_case    :      int      					=    [[]]  # because empty string has empty combination

    # iterate through the indices
    for i in range(lowercase ):
        # condition
        if table[i] != []:
            for word in word_bank:
                # slice condition
                if target[i : i + len(lowercase )] == word:
                    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(lowercase )] += new_combinations

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

    return table[len(lowercase )]


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"""],
      )
  )









"""simple docstring"""



def   __lowerCAmelCase						(						)	->						Union[str, Any]:


    """simple docstring"""





    snake_case    :      Dict      					=    []
    snake_case    :      List[Any]      					=    1

    while len(lowercase ) < 1e6:
        constant.append(str(lowercase ) )
        i += 1

    snake_case    :      Tuple      					=    "".join(lowercase )

    return (
        int(constant[0] )
        * int(constant[9] )
        * int(constant[99] )
        * int(constant[999] )
        * int(constant[9999] )
        * int(constant[9_9999] )
        * int(constant[99_9999] )
    )


if __name__ == "__main__":
  print(solution())





