



'''simple docstring'''




from __future__ import annotations



def       a      (			lowerCamelCase__						,				lowerCamelCase__ = None   ):
			'''simple docstring'''





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

			A_     :						list[list[list[str]]]     =					[]
			for _ in range(lowerCamelCase__   ):
						table.append([]   )
			# seed value
			A_     :						Dict     =					[[]]  # because empty string has empty combination

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

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

			return table[len(lowerCamelCase__   )]


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      a      (			lowerCamelCase__   ):
			'''simple docstring'''





			return " ".join(input_str.split()[::-1]   )


if __name__ == "__main__":
						import doctest

						doctest.testmod()