At a lemonade stand, each lemonade costs $5. 
Customers are standing in a queue to buy from you, and order one at a time (in the order specified by bills).
Each customer will only buy one lemonade and pay with either a $5, $10, or $20 bill.  You must provide the correct change to each customer, so that the net transaction is that the customer pays $5.
Note that you don't have any change in hand at first.
Return true if and only if you can provide every customer with correct change.
 

Example 1:
Input: [5,5,5,10,20]
Output: true
Explanation: 
From the first 3 customers, we collect three $5 bills in order.
From the fourth customer, we collect a $10 bill and give back a $5.
From the fifth customer, we give a $10 bill and a $5 bill.
Since all customers got correct change, we output true.


Example 2:
Input: [5,5,10]
Output: true


Example 3:
Input: [10,10]
Output: false


Example 4:
Input: [5,5,10,10,20]
Output: false
Explanation: 
From the first two customers in order, we collect two $5 bills.
For the next two customers in order, we collect a $10 bill and give back a $5 bill.
For the last customer, we can't give change of $15 back because we only have two $10 bills.
Since not every customer received correct change, the answer is false.

 
Note:

0 <= bills.length <= 10000
bills[i] will be either 5, 10, or 20.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

def _disabled_input(*args, **kwargs):
    raise RuntimeError("input() is disabled in callable mode")
builtins.input = _disabled_input

ns = {"__name__": "__judge__"}  # prevent if __name__ == "__main__" blocks
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'class Solution:\n                \n    def lemonadeChange(self, bills: List[int]) -> bool:               \n#         n5 = 0\n#         n10 = 0\n#         while True:                        \n#             ind10 = bills.index(10) if 10 in bills else 10000\n#             ind20 = bills.index(20) if 20 in bills else 10000            \n            \n#             ind = min(ind10, ind20)                        \n#             if ind ==10000:\n#                 return True\n            \n#             bill_type =bills[ind]\n#             n5 += bills[:ind].count(5)    \n            \n#             if bill_type==10:                      \n#                 if n5==0:\n#                     return False\n#                 n10+=1  \n#                 n5 -=1                \n#             elif bill_type ==20:                \n#                 if n5<3 and n5>0 and n10>0:\n#                     n10 -= 1; n5 -=1\n#                 elif n5 >=3:\n#                     n5 -= 3                                                        \n#                 else:\n#                     return False\n                            \n#             bills = bills[ind+1:] \n#             # print(bills)\n            \n#         else:\n#             return True\n\n        n5=0\n        n10=0            \n        for i in bills:\n            if i == 5:\n                n5 +=1\n            elif i == 10:\n                if n5<=0:\n                    return False\n                else:\n                    n5 -=1\n                    n10 +=1\n            else:\n                if n10>0 and n5 >0:\n                    n10 -=1\n                    n5 -=1\n                elif n5>=3:\n                    n5-=3\n                else:\n                    return False\n        else:\n            return True\n            \n            \n            \n            \n            \n        \n             \n            \n                \n\n#         def deter(part_bill):\n#             n5 = part_bill.count(5)\n#             n10 = part_bill.count(10)\n#             n20 = part_bill.count(20)\n\n#             if (n5 >= n10) and ( (15*n20 <= (5*(n5-n10) + 10*n10)) and (n5-n10)>=n20 ):\n#                 result = True\n#             else:\n#                 result = False\n                \n#             rest5 = n5-n10\n#             rest10 = \n            \n#             return result, n5-n10, n\n\n        \n        \n        \n        \n        \n        \n#         for i in bills:\n            \n#             if i == 5:\n#                 changes.append(5)\n                \n#             elif i == 10:\n#                 if 5 in changes:\n#                     changes.remove(5)\n#                     changes.append(10)\n#                 else:\n#                     return False\n            \n#             else:\n#                 if 5 in changes and 10 in changes:\n#                     changes.remove(5)\n#                     changes.remove(10)\n#                 elif changes.count(5) >=3:\n#                     changes.remove(5)\n#                     changes.remove(5)\n#                     changes.remove(5)                    \n#                 else:\n#                     return False\n                \n#         return True\n\n        \n        \n                \n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

_target = None
_fn_name = 'lemonadeChange'
if _fn_name:
    if "Solution" in ns:
        try:
            _obj = ns["Solution"]()
            if hasattr(_obj, _fn_name):
                _target = getattr(_obj, _fn_name)
        except Exception:
            _target = None
    if _target is None and _fn_name in ns and callable(ns[_fn_name]):
        _target = ns[_fn_name]
# Fallback: if there's exactly one user-defined function, use it
if _target is None:
    _cands = [v for k, v in ns.items() if callable(v) and getattr(v, "__module__", "") in ("__judge__", "__main__")]
    _user_funcs = [c for c in _cands if getattr(c, "__name__", "").startswith("_") is False]
    if len(_user_funcs) == 1:
        _target = _user_funcs[0]
if _target is None:
    raise RuntimeError(f"Could not resolve callable '{_fn_name}'")

_raw = sys.stdin.read().strip()
if _raw:
    _parsed = json.loads(_raw)
    if isinstance(_parsed, dict):
        _kwargs = _parsed.get("kwargs", {})
        _args = _parsed.get("args", [])
    else:
        _args, _kwargs = _parsed, {}
else:
    _args, _kwargs = [], {}
if not isinstance(_args, (list, tuple)):
    _args = [_args]
_res = _target(*_args, **_kwargs)
try:
    sys.stdout.write(repr(_res) + "\n")
except Exception:
    pass

```

Measured memory_bytes: 5434