

'''simple docstring'''



def    a__       (  a__      ,    a__						):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE     =      int(a__						)

     # Initialize Result
     __SCREAMING_SNAKE_CASE     =      []

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

     return answer


# Driver Code
if __name__ == "__main__":
  UpperCAmelCase :       Dict			   =     []
  UpperCAmelCase :       List[str]			   =     '0'

  if (
      input('Do you want to enter your denominations ? (yY/n): ').strip().lower()
      == "y"
  ):
    UpperCAmelCase :       List[str]			   =     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()))
    UpperCAmelCase :       str			   =     input('Enter the change you want to make in Indian Currency: ').strip()
  else:
    # All denominations of Indian Currency if user does not enter
    UpperCAmelCase :       int			   =     [1, 2, 5, 1_0, 2_0, 5_0, 1_0_0, 5_0_0, 2_0_0_0]
    UpperCAmelCase :       Any			   =     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}: """)
    UpperCAmelCase :       Any			   =     find_minimum_change(denominations, value)
    # Print result
    for i in range(len(answer)):
      print(answer[i], end=' ')









'''simple docstring'''



class 						lowerCAmelCase__   :



 """simple docstring"""



 def __init__(		self					:       List[Any]					,							__SCREAMING_SNAKE_CASE					:       int			)  -> List[Any]:


      """simple docstring"""




      __SCREAMING_SNAKE_CASE     =      n
      __SCREAMING_SNAKE_CASE     =      [None] * self.n
      __SCREAMING_SNAKE_CASE     =      0  # index of the first element
      __SCREAMING_SNAKE_CASE     =      0
      __SCREAMING_SNAKE_CASE     =      0
 def __len__(		self					:       Tuple			)  -> int:


      """simple docstring"""




      return self.size
 def       UpperCAmelCase__		(		self					:       Optional[Any]			)  -> bool:


      """simple docstring"""




      return self.size == 0
 def       UpperCAmelCase__		(		self					:       Any			)  -> int:


      """simple docstring"""




      return False if self.is_empty() else self.array[self.front]
 def       UpperCAmelCase__		(		self					:       Dict					,							__SCREAMING_SNAKE_CASE					:       Union[str, Any]			)  -> Dict:


      """simple docstring"""




      if self.size >= self.n:
           raise Exception("""QUEUE IS FULL"""			)

      __SCREAMING_SNAKE_CASE     =      data
      __SCREAMING_SNAKE_CASE     =      (self.rear + 1) % self.n
      self.size += 1
      return self


 def       UpperCAmelCase__		(		self					:       List[str]			)  -> Optional[Any]:


      """simple docstring"""




      if self.size == 0:
           raise Exception("""UNDERFLOW"""			)

      __SCREAMING_SNAKE_CASE     =      self.array[self.front]
      __SCREAMING_SNAKE_CASE     =      None
      __SCREAMING_SNAKE_CASE     =      (self.front + 1) % self.n
      self.size -= 1
      return temp






