C++ Solution
\nclass Solution {\npublic:\n    bool winnerOfGame(string c) {\n        int a = 0,b =0;\n        for(int i = 1 ; i < c.length()-1 ; i++){\n\t\t// Counting the n
```\nclass Solution {\npublic:\n    bool winnerOfGame(string c) {\n        int a = 0,b =0;\n        for(int i = 1 ; i < c.length()-1 ; i++){\n\t\t// Counting the number of \'AAA\' & \'BBB\'\n            if( c[i] == \'A\' && c[i-1] == \'A\' && c[i+1] == \'A\'  ){\n                a++;\n            }else if(c[i] == \'B\' && c[i-1] == \'B\' && c[i+1] == \'B\' ){\n                b++;\n            }\n        }\n        if(a>b){\n            return true;\n        }\n        return false;\n    }\n};\n```
['C']