
"""simple docstring"""




def 							_lowerCamelCase			(			__a     ):
		if not isinstance(__a,				__a     ):
				raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''     )
		if len(__a     ) == 0:
				raise ValueError('''Input list must be a non empty list'''     )
		if len(__a     ) == 1:
				return True
		SCREAMING_SNAKE_CASE_    			=			series[1] - series[0]
		for index in range(len(__a     ) - 1     ):
				if series[index + 1] - series[index] != common_diff:
						return False
		return True



def 							_lowerCamelCase			(			__a     ):
		if not isinstance(__a,				__a     ):
				raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''     )
		if len(__a     ) == 0:
				raise ValueError('''Input list must be a non empty list'''     )
		SCREAMING_SNAKE_CASE_    			=			0
		for val in series:
				answer += val
		return answer / len(__a     )


if __name__ == "__main__":
						import doctest

						doctest.testmod()

"""simple docstring"""




from __future__ import annotations



def 							_lowerCamelCase			(			__a,				__a = None     ):
		SCREAMING_SNAKE_CASE_    			=			word_bank or []
		# create a table
		SCREAMING_SNAKE_CASE_    			=			len(__a     ) + 1

		SCREAMING_SNAKE_CASE_    			=			[]
		for _ in range(__a     ):
				table.append([]     )
		# seed value
		SCREAMING_SNAKE_CASE_    			=			[[]]  # 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_    			=			[
										    [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'],
						    )
						)