





"""simple docstring"""




def 							SCREAMING_SNAKE_CASE__  (      __a				):
	# if the collection is empty, returns empty
	if collection == []:
		return []

	# get some information about the collection
	snake_case_						:     Dict     =		len(__a				)
	snake_case_						:     Optional[int]     =		max(__a				)
	snake_case_						:     Optional[Any]     =		min(__a				)

	# create the counting array
	snake_case_						:     Any     =		coll_max + 1 - coll_min
	snake_case_						:     str     =		[0] * counting_arr_length

	# count how much a number appears in the collection
	for number in collection:
		counting_arr[number - coll_min] += 1

	# sum each position with it's predecessors. now, counting_arr[i] tells
	# us how many elements <= i has in the collection
	for i in range(1				,	__a				):
		snake_case_						:     Optional[int]     =		counting_arr[i] + counting_arr[i - 1]

	# create the output collection
	snake_case_						:     List[Any]     =		[0] * coll_len

	# place the elements in the output, respecting the original order (stable
	# sort) from end to begin, updating counting_arr
	for i in reversed(range(0				,	__a				)				):
		snake_case_						:     int     =		collection[i]
		counting_arr[collection[i] - coll_min] -= 1

	return ordered


def 							SCREAMING_SNAKE_CASE__  (      __a				):
	return "".join([chr(__a				) for i in counting_sort([ord(__a				) for c in string]				)]				)


if __name__ == "__main__":
						# Test string sort
						assert counting_sort_string("""thisisthestring""") == "eghhiiinrsssttt"

						_SCREAMING_SNAKE_CASE 		=						input("""Enter numbers separated by a comma:\n""").strip()
						_SCREAMING_SNAKE_CASE 		=						[int(item) for item in user_input.split(""",""")]
						print(counting_sort(unsorted))








from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_SCREAMING_SNAKE_CASE 		=						{
    """configuration_mctct""": ["""MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MCTCTConfig"""],
    """feature_extraction_mctct""": ["""MCTCTFeatureExtractor"""],
    """processing_mctct""": ["""MCTCTProcessor"""],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_SCREAMING_SNAKE_CASE 		=						[
						    """MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """MCTCTForCTC""",
						    """MCTCTModel""",
						    """MCTCTPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
						from .feature_extraction_mctct import MCTCTFeatureExtractor
						from .processing_mctct import MCTCTProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
						import sys

						_SCREAMING_SNAKE_CASE 		=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

