
"""simple docstring"""




from __future__ import annotations


def   __magic_name__	(      __snake_case				:       str     , __snake_case				:       list[str] | None = None  ) ->				list[list[str]]:
       lowercase    :				List[str]       		=							word_bank or []
       # create a table
       lowercase    :				int       		=							len(__snake_case  ) + 1

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

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

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

       return table[len(__snake_case  )]


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"""




from __future__ import annotations


def   __magic_name__	(      __snake_case				:       list[int]  ) ->				list[int]:
       if len(__snake_case  ) == 0:
              return array

       lowercase		,    lowercase    :				Tuple       		=							min(__snake_case  ), max(__snake_case  )

       # Compute the variables
       lowercase    :				Optional[Any]       		=							_max - _min + 1
       lowercase		,    lowercase    :				List[str]       		=							[0] * holes_range, [0] * holes_range

       # Make the sorting.
       for i in array:
              lowercase    :				Tuple       		=							i - _min
              lowercase    :				str       		=							i
              holes_repeat[index] += 1

       # Makes the array back by replacing the numbers.
       lowercase    :				Union[str, Any]       		=							0
       for i in range(__snake_case  ):
              while holes_repeat[i] > 0:
                     lowercase    :				Tuple       		=							holes[i]
                     index += 1
                     holes_repeat[i] -= 1

    # Returns the sorted array.
       return array


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   _A			:       str   		=       input("""Enter numbers separated by comma:\n""")
   _A			:       Optional[Any]   		=       [int(x) for x in user_input.split(""",""")]
   print(pigeon_sort(unsorted))


