python not fastest but easy to read (36 ms, faster than 73.13%)
\nclass Solution:\n    def strWithout3a3b(self, A: int, B: int) -> str:\n        output = ""\n        a = 0  # length of last sequence of \'a\'\n        b = 0  
```\nclass Solution:\n    def strWithout3a3b(self, A: int, B: int) -> str:\n        output = ""\n        a = 0  # length of last sequence of \'a\'\n        b = 0  # length of last sequence of \'b\'\n        i = 0\n        size = A + B\n        \n        while i < size:\n            if (a < 2 and A > B) or b==2:\n                output += \'a\'\n                b = 0\n                a += 1\n                A -= 1\n            else: \n                output += \'b\'\n                b += 1\n                a = 0\n                B -= 1\n            i += 1\n            \n        return output    \n```
['Python']