Design an ATM Machine LeetCode solution in Python
1class ATM:2def __init__(self):3self.cash = [0] * 54self.values = [20, 50, 100, 200, 500]56def deposit(self, banknotes_count: List[int]) -> None:7for i, n in enumerate(banknotes_count):8self.cash[i] += n910def withdraw(self, amount: int) -> List[int]:11res = []12for val, n in zip(self.values[::-1], self.cash[::-1]):13need = min(n, amount // val)14res = [need] + res15amount -= need * val16if amount == 0:17self.deposit([-x for x in res])18return res19else:20return [-1]