'''simple docstring'''


from __future__ import annotations

import math





def       lowerCAmelCase					(		UpperCamelCase__				:   float    ,					UpperCamelCase__				:   int       ):


	"""simple docstring"""
	__UpperCAmelCase							=			u
	for i in range(1    ,					UpperCamelCase__       ):
		__UpperCAmelCase							=			temp * (u - i)
	return temp





def       lowerCAmelCase					(		):


	"""simple docstring"""
	__UpperCAmelCase							=			int(input('''enter the numbers of values: '''       )       )
	__UpperCAmelCase							=			[]
	for _ in range(UpperCamelCase__       ):
		y.append([]       )
	for i in range(UpperCamelCase__       ):
		for j in range(UpperCamelCase__       ):
			y[i].append(UpperCamelCase__       )
			__UpperCAmelCase							=			0

	print('''enter the values of parameters in a list: '''       )
	__UpperCAmelCase							=			list(map(UpperCamelCase__    ,					input().split()       )       )

	print('''enter the values of corresponding parameters: '''       )
	for i in range(UpperCamelCase__       ):
		__UpperCAmelCase							=			float(input()       )

	__UpperCAmelCase							=			int(input('''enter the value to interpolate: '''       )       )
	__UpperCAmelCase							=			(value - x[0]) / (x[1] - x[0])

	# for calculating forward difference table

	for i in range(1    ,					UpperCamelCase__       ):
		for j in range(n - i       ):
			__UpperCAmelCase							=			y[j + 1][i - 1] - y[j][i - 1]

	__UpperCAmelCase							=			y[0][0]
	for i in range(1    ,					UpperCamelCase__       ):
		summ += (ucal(UpperCamelCase__    ,					UpperCamelCase__       ) * y[0][i]) / math.factorial(UpperCamelCase__       )

	print(f"""the value at {value} is {summ}"""       )


if __name__ == "__main__":
					main()

'''simple docstring'''


def       lowerCAmelCase					(		UpperCamelCase__				:   Tuple       ):


	"""simple docstring"""
	# if the collection is empty, returns empty
	if collection == []:
		return []

	# get some information about the collection
	__UpperCAmelCase							=			len(UpperCamelCase__       )
	__UpperCAmelCase							=			max(UpperCamelCase__       )
	__UpperCAmelCase							=			min(UpperCamelCase__       )

	# create the counting array
	__UpperCAmelCase							=			coll_max + 1 - coll_min
	__UpperCAmelCase							=			[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    ,					UpperCamelCase__       ):
		__UpperCAmelCase							=			counting_arr[i] + counting_arr[i - 1]

	# create the output collection
	__UpperCAmelCase							=			[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    ,					UpperCamelCase__       )       ):
		__UpperCAmelCase							=			collection[i]
		counting_arr[collection[i] - coll_min] -= 1

	return ordered





def       lowerCAmelCase					(		UpperCamelCase__				:   Any       ):


	"""simple docstring"""
	return "".join([chr(UpperCamelCase__       ) for i in counting_sort([ord(UpperCamelCase__       ) for c in string]       )]       )


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

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