[Python 3] Recursion
aWin1(cnt0,cnt1,cnt2): A will win with current sum 1 and the remaining counts of stones, cnt0, cnt1, and cnt2\nbWin1(cnt0,cnt1,cnt2): B will win with current su
aWin1(cnt0,cnt1,cnt2): A will win with current sum 1 and the remaining counts of stones, cnt0, cnt1, and cnt2\nbWin1(cnt0,cnt1,cnt2): B will win with current sum 1 and the remaining counts of stones, cnt0, cnt1, and cnt2\n\nThree things to note:\n1. xWin1(cnt0,cnt1,cnt2)=xWin1(cnt0-2,cnt1,cnt2) : if cnt0>1\n2. xWin1(cnt0,cnt1,cnt2)=xWin1(cnt0,cnt1-1,cnt2-1) : if cnt1,cnt2>0\n3. xWin1(cnt0,cnt1,cnt2)=xWin2(cnt0,cnt2,cnt1)\n\n```\n    def stoneGameIX(self, stones: List[int]) -> bool:\n        dictC = Counter(s%3 for s in stones)\n        dictC[0] &= 1                                                #(noted from 1 above)\n        if dictC[1]==dictC[2]==0:           return False\n        \n        AWin1 = { (0,0,1): False, (1,0,1):  True, (0,1,0): False, (1,1,0): False, (0,1,1): False, (1,1,1): False }\n        def aWin1(a,b,c):\n            minBC = min(b,c);           b,c = b-minBC,c-minBC        #(noted from 2 above)\n            if a==b==0:                 return False\n            if b==c==0:                 return False\n            if (a,b,c)   in AWin1:      return AWin1[a,b,c]\n            AWin1[a,b,c] = any( not bWin1(*t) for t in [(a-1,b,c),(a,c,b-1)] if all( e>=0 for e in t ) )\n            return AWin1[a,b,c]\n        BWin1 = { (0,0,1): False, (1,0,1):  True, (0,1,0):  True, (1,1,0):  True, (0,1,1):  True, (1,1,1): True  }\n        def bWin1(a,b,c):\n            minBC = min(b,c);           b,c = b-minBC,c-minBC        #(noted from 2 above)\n            if a==b==0:                 return not c\n            if b==c==0:                 return True\n            if (a,b,c)   in BWin1:      return BWin1[a,b,c]\n            BWin1[a,b,c] = any( not aWin1(*t) for t in [(a-1,b,c),(a,c,b-1)] if all( e>=0 for e in t ) )\n            return BWin1[a,b,c]\n            \n        return any( not bWin1(*t) for t in [(dictC[0],dictC[1]-1,dictC[2]), (dictC[0],dictC[2]-1,dictC[1])]  if all( e>=0 for e in t ) )        \n```
[]