



import functools
from typing import Any



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					):

			# Validation
			if not isinstance(SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					) or len(SCREAMING_SNAKE_CASE_					) == 0:
						raise ValueError("the string should be not empty string"					)

			if not isinstance(SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					) or not all(
			    isinstance(SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					) and len(SCREAMING_SNAKE_CASE_					) > 0 for item in words					):
						raise ValueError("the words should be a list of non-empty strings"					)

			# Build trie
			lowercase__   					=			{}
			lowercase__   					=			"WORD_KEEPER"

			for word in words:
						lowercase__   					=			trie
						for c in word:
									if c not in trie_node:
												lowercase__   					=			{}

									lowercase__   					=			trie_node[c]

						lowercase__   					=			True

			lowercase__   					=			len(SCREAMING_SNAKE_CASE_					)

			# Dynamic programming method
			@functools.cache
			def is_breakable(SCREAMING_SNAKE_CASE_					) -> bool:
						if index == len_string:
									return True

						lowercase__   					=			trie
						for i in range(SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					):
									lowercase__   					=			trie_node.get(string[i]  ,					SCREAMING_SNAKE_CASE_					)

									if trie_node is None:
												return False

									if trie_node.get(SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					) and is_breakable(i + 1					):
												return True

						return False

			return is_breakable(0					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()









def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			lowercase__   					=			len(SCREAMING_SNAKE_CASE_					)
			for i in range(SCREAMING_SNAKE_CASE_					):
						for j in range(i + 1  ,					SCREAMING_SNAKE_CASE_					):
									if numbers[j] < numbers[i]:
												lowercase__					,    lowercase__   					=			numbers[j], numbers[i]
			return numbers


if __name__ == "__main__":
							lowercase_						=       input("""Enter numbers separated by a comma:\n""").strip()
							lowercase_						=       [int(item) for item in user_input.split(""",""")]
							print(exchange_sort(unsorted))




