"""simple docstring"""







from __future__ import annotations

from random import choice
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       Optional[int]						)							->    Optional[Any]:

	'''simple docstring'''





	return choice(UpperCAmelCase_						)
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       list[int]    ,							UpperCAmelCase_					:       int						)							->    int:

	'''simple docstring'''





	__snake_case    :							Any   	=				random_pivot(UpperCAmelCase_						)

	# partition based on pivot
	# linear time
	__snake_case    :							int   	=				[e for e in lst if e < pivot]
	__snake_case    :							Optional[Any]   	=				[e for e in lst if e > pivot]

	# if we get lucky, pivot might be the element we want.
	# we can easily see this:
	# small (elements smaller than k)
	# + pivot (kth element)
	# + big (elements larger than k)
	if len(UpperCAmelCase_						) == k - 1:
		return pivot
	# pivot is in elements bigger than k
	elif len(UpperCAmelCase_						) < k - 1:
		return kth_number(UpperCAmelCase_    ,							k - len(UpperCAmelCase_						) - 1						)
	# pivot is in elements smaller than k
	else:
		return kth_number(UpperCAmelCase_    ,							UpperCAmelCase_						)


if __name__ == "__main__":
	import doctest

	doctest.testmod()






"""simple docstring"""







def 						__UpperCAmelCase       (					UpperCAmelCase_					:       list[int]    ,							UpperCAmelCase_					:       str						)							->    list[int]:

	'''simple docstring'''





	__snake_case    :							Union[str, Any]   	=				int(UpperCAmelCase_						)

	# Initialize Result
	__snake_case    :							int   	=				[]

	# Traverse through all denomination
	for denomination in reversed(UpperCAmelCase_						):
		# Find denominations
		while int(UpperCAmelCase_						) >= int(UpperCAmelCase_						):
			total_value -= int(UpperCAmelCase_						)
			answer.append(UpperCAmelCase_						)  # Append the "answers" array

	return answer


# Driver Code
if __name__ == "__main__":
	_a  :  Optional[int]=				[]
	_a  :  Optional[int]=				"0"

	if (
	    input("Do you want to enter your denominations ? (yY/n): ").strip().lower()
	    == "y"
	):
		_a  :  int=				int(input("Enter the number of denominations you want to add: ").strip())

		for i in range(0, n):
			denominations.append(int(input(f'''Denomination {i}: ''').strip()))
		_a  :  Optional[int]=				input("Enter the change you want to make in Indian Currency: ").strip()
	else:
		# All denominations of Indian Currency if user does not enter
		_a  :  Tuple=				[1, 2, 5, 10, 20, 50, 100, 500, 2_000]
		_a  :  List[str]=				input("Enter the change you want to make: ").strip()

	if int(value) == 0 or int(value) < 0:
		print("The total value cannot be zero or negative.")

	else:
		print(f'''Following is minimal change for {value}: ''')
		_a  :  List[Any]=				find_minimum_change(denominations, value)
		# Print result
		for i in range(len(answer)):
			print(answer[i], end=" ")





