1# Runtime: 65 ms (Top 11.66%) | Memory: 13.9 MB (Top 19.37%)234class Solution:5def strongPasswordCheckerII(self, pwd: str) -> bool:6return (7len(pwd) > 78and max(len(list(p[1])) for p in groupby(pwd)) == 19and reduce(10lambda a, b: a11| (1 if b.isdigit() else 2 if b.islower() else 4 if b.isupper() else 8),12pwd,130,14)15== 1516)