simple solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    bool winnerOfGame(string colors) {\n        if(colors.size()>=100000){\n            int cntA=0, cntB=0;\n           for(int i=0;i<colors.size();i++){\n               if(colors[i]==\'A\')cntA++;\n               if(colors[i]==\'B\')cntB++;\n           }\n           return cntA>cntB;\n        }\n        while(true){\n        if(colors.size()<3)return false;\n            for(int i=1;i<colors.size()-1;i++){\n                if(colors[i]==\'A\' && colors[i+1]==\'A\' && colors[i-1]==\'A\'){\n                    colors.erase(colors.begin()+i);\n                    break;\n                }\n                else if(i==colors.size()-2) return false;\n            }\n        if(colors.size()<3)return true;\n            for(int i=1;i<colors.size()-1;i++){\n                if(colors[i]==\'B\' && colors[i+1]==\'B\' && colors[i-1]==\'B\'){\n                    colors.erase(colors.begin()+i);\n                    break;\n                }\n                else if(i==colors.size()-2) return true;\n            }\n        }\n        return false;\n    }\n};\n```
['C++']