


'''simple docstring'''






from __future__ import annotations


def       _snake_case     (  A				,					A = None )		->					list[list[str]]:
							lowerCAmelCase__      =			word_bank or []
							# create a table
							lowerCAmelCase__      =			len(lowerCamelCase__ ) + 1

							lowerCAmelCase__      =			[]
							for _ in range(lowerCamelCase__ ):
														table.append([] )
							# seed value
							lowerCAmelCase__      =			[[]]  # 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:
																																			lowerCAmelCase__      =			[
																																			    [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       _snake_case     (  A )		->					int:
							return 1 if digit in (0, 1) else (digit * factorial(digit - 1 ))


def       _snake_case     (  A )		->					bool:
							lowerCAmelCase__      =			0
							lowerCAmelCase__      =			number
							while duplicate > 0:
														lowerCAmelCase__     ,      lowerCAmelCase__      =			divmod(A				,					10 )
														fact_sum += factorial(A )
							return fact_sum == number


if __name__ == "__main__":
		print('''Program to check whether a number is a Krisnamurthy Number or not.''')
		__UpperCAmelCase					       =							int(input('''Enter number: ''').strip())
		print(
		    f"""{number} is {'' if krishnamurthy(number) else 'not '}a Krishnamurthy Number."""
		)