Python3 short and simple
\nclass Solution:\n    def strWithout3a3b(self, A, B):\n        ans = []        \n        while A and B:\n            if A > B:\n                ans.append(\'aa
```\nclass Solution:\n    def strWithout3a3b(self, A, B):\n        ans = []        \n        while A and B:\n            if A > B:\n                ans.append(\'aab\')\n                A, B = A - 2, B - 1\n            elif A < B:\n                ans.append(\'bba\')\n                A, B = A - 1, B - 2\n            else:\n                ans.append(\'ba\')\n                A, B = A - 1, B - 1\n        \n        ans.append(\'a\' * A)\n        ans.append(\'b\' * B)\n        return "".join(ans)\n```
[]